WordPress at Your Fingertips
function is not described

WC_REST_Authentication::check_user_permissions() public WC 1.0

Check for user permissions and register last access.

{} It's a method of the class: WC_REST_Authentication{}

No Hooks.




$WC_REST_Authentication = new WC_REST_Authentication();
$WC_REST_Authentication->check_user_permissions( $result, $server, $request );
$result(mixed) (required)
Response to replace the requested version with.
$server(WP_REST_Server) (required)
Server instance.
$request(WP_REST_Request) (required)
Request used to generate the response.

Code of WC_REST_Authentication::check_user_permissions() WC 5.9.0

public function check_user_permissions( $result, $server, $request ) {
	if ( $this->user ) {
		// Check API Key permissions.
		$allowed = $this->check_permissions( $request->get_method() );
		if ( is_wp_error( $allowed ) ) {
			return $allowed;

		// Register last access.

	return $result;