WordPress at a glance
function is not described

Automattic\WooCommerce\Admin\Notes

Notes::delete_all_notes() public WC 1.0

Soft delete of all the admin notes. Returns the deleted items.

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

No Hooks.

Return

Array. Array of notes.

Usage

$result = Notes::delete_all_notes();

Code of Notes::delete_all_notes() WC 5.2.2

<?php
public static function delete_all_notes() {
	$data_store = \WC_Data_Store::load( 'admin-note' );
	// Here we filter for the same params we are using to show the note list in client side.
	$raw_notes = $data_store->get_notes(
		array(
			'order'      => 'desc',
			'orderby'    => 'date_created',
			'per_page'   => 25,
			'page'       => 1,
			'type'       => array(
				Note::E_WC_ADMIN_NOTE_INFORMATIONAL,
				Note::E_WC_ADMIN_NOTE_MARKETING,
				Note::E_WC_ADMIN_NOTE_WARNING,
				Note::E_WC_ADMIN_NOTE_SURVEY,
			),
			'is_deleted' => 0,
		)
	);

	$notes = array();
	foreach ( (array) $raw_notes as $raw_note ) {
		$note = self::get_note( $raw_note->note_id );
		if ( $note ) {
			self::delete_note( $note );
			array_push( $notes, $note );
		}
	}
	return $notes;
}