Automattic\WooCommerce\StoreApi\Routes\V1

AbstractRoute::get_route_delete_response()protectedWC 1.0

Get route response for DELETE requests.

When implemented, should return a \WP_REST_Response.

Method of the class: AbstractRoute{}

No Hooks.

Return

\WP_REST_Response.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_route_delete_response( $request );
$request(\WP_REST_Request) (required)
Request object.

AbstractRoute::get_route_delete_response() code WC 9.3.3

protected function get_route_delete_response( \WP_REST_Request $request ) {
	return $this->get_route_error_response( 'woocommerce_rest_invalid_endpoint', __( 'Method not implemented', 'woocommerce' ), 404 );
}