WC_Admin_Importers::import_allowed
Return true if WooCommerce imports are allowed for current user, false otherwise.
Method of the class: WC_Admin_Importers{}
No Hooks.
Returns
true|false. Whether current user can perform imports.
Usage
// protected - for code of main (parent) or child class $result = $this->import_allowed();
WC_Admin_Importers::import_allowed() WC Admin Importers::import allowed code WC 10.4.3
protected function import_allowed() {
return current_user_can( 'edit_products' ) && current_user_can( 'import' );
}