WC_Admin_Importers::import_allowed()protectedWC 1.0

Return true if WooCommerce imports are allowed for current user, false otherwise.

{} It's a method of the class: WC_Admin_Importers{}

No Hooks.

Return

true|false. Whether current user can perform imports.

Usage

// protected - for code of main (parent) or child class
$result = $this->import_allowed();

Code of WC_Admin_Importers::import_allowed() WC 6.7.0

protected function import_allowed() {
	return current_user_can( 'edit_products' ) && current_user_can( 'import' );
}