WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Blocks\StoreApi\Routes

CartItems::get_route_delete_response() protected WC 1.0

Deletes all items in the cart.

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

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.

Code of CartItems::get_route_delete_response() WC 5.7.1

protected function get_route_delete_response( \WP_REST_Request $request ) {
	$this->cart_controller->empty_cart();
	return new \WP_REST_Response( [], 200 );
}