WordPress at a glance
function is not described


OnboardingTasks::get_status_permission_check() public WC 1.0

Check if a given request has access to get onboarding tasks status.

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

No Hooks.


WP_Error|true|false. Nothing.


$OnboardingTasks = new OnboardingTasks();
$OnboardingTasks->get_status_permission_check( $request );
$request(WP_REST_Request) (required)
Full details about the request.

Code of OnboardingTasks::get_status_permission_check() WC 5.2.2

public function get_status_permission_check( $request ) {
	if ( ! current_user_can( 'manage_options' ) ) {
		return new \WP_Error( 'woocommerce_rest_cannot_create', __( 'Sorry, you are not allowed to retrieve onboarding status.', 'woocommerce' ), array( 'status' => rest_authorization_required_code() ) );

	return true;