woocommerce_rest_check_permissions

woocommerce_rest_check_permissions

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

apply_filters('woocommerce_rest_check_permissions') is found 5 times:

  • /includes/wc-rest-functions.php line 244
    		$post_type_object = get_post_type_object( $post_type );
    		$permission       = current_user_can( $post_type_object->cap->$cap, $object_id );
    	}
    
    	return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, $post_type );
    }
    
    /**
     * Check permissions of users on REST API.
     *
     * @since 2.6.0
    
  • /includes/wc-rest-functions.php line 282
    	} else {
    		$permission = current_user_can( $contexts[ $context ], $object_id );
    	}
    
    	return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, 'user' );
    }
    
    /**
     * Check permissions of product terms on REST API.
     *
     * @since 2.6.0
    
  • /includes/wc-rest-functions.php line 307
    	$cap             = $contexts[ $context ];
    	$taxonomy_object = get_taxonomy( $taxonomy );
    	$permission      = current_user_can( $taxonomy_object->cap->$cap, $object_id );
    
    	return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, $taxonomy );
    }
    
    /**
     * Check manager permissions on REST API.
     *
     * @since 2.6.0
    
  • /includes/wc-rest-functions.php line 331
    	);
    
    	$permission = current_user_can( $objects[ $object ] );
    
    	return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, 0, $object );
    }
    
    /**
     * Check product reviews permissions on REST API.
     *
     * @since 3.5.0
    
  • /includes/wc-rest-functions.php line 364

    Warning: Undefined array key 365 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 366 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 367 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 368 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    Warning: Undefined array key 369 in /home/c6974294/public_html/wp-plugin-api.com/wp-content/themes/wordpress-hooks/functions.php on line 167

    	if ( isset( $contexts[ $context ] ) ) {
    		$permission = current_user_can( $contexts[ $context ], $object_id );
    	}
    
    	return apply_filters( 'woocommerce_rest_check_permissions', $permission, $context, $object_id, 'product_review' );
    }
    
    
    
    
    
    

See this hook used in plugins: