Automattic\WooCommerce\Internal\Admin\Suggestions\Incentives

Incentive::user_has_caps()protectedWC 1.0

Check if the current user has the required capabilities to view incentives.

Method of the class: Incentive{}

No Hooks.

Return

true|false. Whether the current user has the required capabilities view incentives.

Usage

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

Incentive::user_has_caps() code WC 9.6.0

protected function user_has_caps(): bool {
	return current_user_can( 'manage_woocommerce' );
}