Automattic\WooCommerce\Admin\Notes

DataStore::get_note_ids_by_type()publicWC 1.0

Find the ids of all notes with a given type.

Метод класса: DataStore{}

No Hooks.

Return

Array. An array of matching note ids.

Usage

$DataStore = new DataStore();
$DataStore->get_note_ids_by_type( $note_type );
$note_type(string) (required)
Type to search for.

Code of DataStore::get_note_ids_by_type() WC 7.1.0

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