Automattic\WooCommerce\Admin\Notes

Notes::get_note()public staticWC 1.0

Get admin note using it's ID

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

Хуков нет.

Возвращает

Note|true|false.

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

$result = Notes::get_note( $note_id );
$note_id(int) (обязательный)
Note ID.

Код Notes::get_note() WC 8.7.0

public static function get_note( $note_id ) {
	if ( false !== $note_id ) {
		try {
			return new Note( $note_id );
		} catch ( \Exception $e ) {
			wc_caught_exception( $e, __CLASS__ . '::' . __FUNCTION__, array( $note_id ) );
			return false;
		}
	}

	return false;
}