Automattic\WooCommerce\Internal\MCP\Transport
WooCommerceRestTransport::check_ability_permission
Deprecated since 11.3.0. It is no longer supported and may be removed in future releases. It is recommended to replace this function with the same one.
Formerly checked REST-derived ability permissions against the API key permissions.
Method of the class: WooCommerceRestTransport{}
No Hooks.
Returns
bool. The unchanged $allowed value.
Usage
$WooCommerceRestTransport = new WooCommerceRestTransport(); $WooCommerceRestTransport->check_ability_permission( $allowed, $method, $controller );
- $allowed(true|false) (required)
- Whether the operation is allowed.
- $method(string) (required)
- HTTP method. Ignored.
- $controller(object) (required)
- REST controller instance. Ignored.
Changelog
| Deprecated since | 11.3.0 |
WooCommerceRestTransport::check_ability_permission() WooCommerceRestTransport::check ability permission code WC 11.3.0
public function check_ability_permission( $allowed, $method, $controller ) {
unset( $method, $controller ); // Kept for backward compatibility.
McpEndpointRemoval::doing_it_wrong( __METHOD__ );
return $allowed;
}