Automattic\WooCommerce\Admin\Notes

DataStore::get_notes_with_name()publicWC 1.0

Find all the notes with a given name.

Method of the class: DataStore{}

No Hooks.

Return

Array. An array of matching note ids.

Usage

$DataStore = new DataStore();
$DataStore->get_notes_with_name( $name );
$name(string) (required)
Name to search for.

DataStore::get_notes_with_name() code WC 8.7.0

public function get_notes_with_name( $name ) {
	global $wpdb;
	return $wpdb->get_col(
		$wpdb->prepare(
			"SELECT note_id FROM {$wpdb->prefix}wc_admin_notes WHERE name = %s ORDER BY note_id ASC",
			$name
		)
	);
}