WC_REST_WCCOM_Site_Controller::user_has_permission()protectedWC 8.6.0

Check whether user has permission to access controller's endpoints.

Method of the class: WC_REST_WCCOM_Site_Controller{}

No Hooks.

Return

true|false.

Usage

// protected - for code of main (parent) or child class
$result = $this->user_has_permission( $user ) : bool;
$user(WP_USER) (required)
User object.

Changelog

Since 8.6.0 Introduced.

WC_REST_WCCOM_Site_Controller::user_has_permission() code WC 9.3.3

abstract protected function user_has_permission( $user ) : bool;