WordPress at Your Fingertips
function is not described

Automattic\WooCommerce\Admin\API

Notes::delete_all_items() public WC 1.0

Delete all notes.

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

No Hooks.

Return

WP_REST_Request|WP_Error.

Usage

$Notes = new Notes();
$Notes->delete_all_items( $request );
$request(WP_REST_Request) (required)
Request object.

Code of Notes::delete_all_items() WC 6.1.1

public function delete_all_items( $request ) {
	$args = array();
	if ( isset( $request['status'] ) ) {
		$args['status'] = $request['status'];
	}
	$notes = NotesRepository::delete_all_notes( $args );
	$data  = array();
	foreach ( (array) $notes as $note_obj ) {
		$data[] = $this->prepare_note_data_for_response( $note_obj, $request );
	}

	$response = rest_ensure_response( $data );
	$response->header( 'X-WP-Total', NotesRepository::get_notes_count( array( 'info', 'warning' ), array() ) );
	return $response;
}