Automattic\WooCommerce\Admin\Notes

DataStore::get_note_ids_by_type()publicWC 1.0

Find the ids of all notes with a given type.

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

Хуков нет.

Возвращает

Массив. An array of matching note ids.

Использование

$DataStore = new DataStore();
$DataStore->get_note_ids_by_type( $note_type );
$note_type(строка) (обязательный)
Type to search for.

Код DataStore::get_note_ids_by_type() WC 8.7.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
		)
	);
}