WC_Admin_Importers::import_allowed() protected WC 1.0
Return true if WooCommerce imports are allowed for current user, false otherwise.
{} Это метод класса: WC_Admin_Importers{}
Хуков нет.
Возвращает
true/false. Whether current user can perform imports.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->import_allowed();
Код WC_Admin_Importers::import_allowed() WC Admin Importers::import allowed WC 5.0.0
protected function import_allowed() {
return current_user_can( 'edit_products' ) && current_user_can( 'import' );
}