WordPress at a glance
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( \WP_REST_Request $request );
\WP_REST_Request $request (required)
-

Code of CartItems::get_route_delete_response() WC 5.0.0

<?php
protected function get_route_delete_response( \WP_REST_Request $request ) {
	$controller = new CartController();
	$controller->empty_cart();
	return new \WP_REST_Response( [], 200 );
}