Automattic\WooCommerce\Internal\MCP\Transport

WooCommerceRestTransport::validate_request │ public │ WC 1.0

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 validated a request to the WooCommerce MCP endpoint.

Method of the class: WooCommerceRestTransport{}

No Hooks.

Returns

WP_Error. Always an error, since the endpoint was removed.

Usage

$WooCommerceRestTransport = new WooCommerceRestTransport();
$WooCommerceRestTransport->validate_request( $request );
$request(WP_REST_Request) (required)
The REST request object. Ignored.

Changelog

Deprecated since 11.3.0

WooCommerceRestTransport::validate_request() code WC 11.3.0

public function validate_request( \WP_REST_Request $request ) {
	unset( $request ); // Kept for backward compatibility.
	McpEndpointRemoval::doing_it_wrong( __METHOD__ );
	return self::get_removed_error();
}