Automattic\WooCommerce\Admin\Notes
Notes::get_note_status() public WC 1.0
Get the status of a given note by name.
{} Это метод класса: Notes{}
Хуков нет.
Возвращает
Строку/true/false. The note status.
Использование
$result = Notes::get_note_status( $note_name );
- $note_name(строка) (обязательный)
- Name of the note.
Код Notes::get_note_status() Notes::get note status WC 5.0.0
public static function get_note_status( $note_name ) {
$data_store = \WC_Data_Store::load( 'admin-note' );
$note_ids = $data_store->get_notes_with_name( $note_name );
if ( empty( $note_ids ) ) {
return false;
}
$note = self::get_note( $note_ids[0] );
return $note->get_status();
}