Automattic\WooCommerce\Internal\Admin\Suggestions\Incentives
Incentive::user_has_caps()
Check if the current user has the required capabilities to view incentives.
Метод класса: Incentive{}
Хуков нет.
Возвращает
true|false
. Whether the current user has the required capabilities view incentives.
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->user_has_caps(): bool;
Код Incentive::user_has_caps() Incentive::user has caps WC 9.6.1
protected function user_has_caps(): bool { return current_user_can( 'manage_woocommerce' ); }