WC_Admin_Exporters::export_allowed()protectedWC 1.0

Return true if WooCommerce export is allowed for current user, false otherwise.

Метод класса: WC_Admin_Exporters{}

Хуков нет.

Возвращает

true|false. Whether current user can perform export.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->export_allowed();

Код WC_Admin_Exporters::export_allowed() WC 8.7.0

protected function export_allowed() {
	return current_user_can( 'edit_products' ) && current_user_can( 'export' );
}