Automattic\WooCommerce\Admin\Notes

Notes::load_data_store()public staticWC 1.0

Loads the data store.

If the "admin-note" data store is unavailable, attempts to load it will result in an exception. This method catches that exception and throws a custom one instead.

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

Хуков нет.

Возвращает

\WC_Data_Store. The "admin-note" data store.

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

$result = Notes::load_data_store();

Код Notes::load_data_store() WC 8.7.0

public static function load_data_store() {
	try {
		return \WC_Data_Store::load( 'admin-note' );
	} catch ( \Exception $e ) {
		throw new NotesUnavailableException(
			'woocommerce_admin_notes_unavailable',
			__( 'Notes are unavailable because the "admin-note" data store cannot be loaded.', 'woocommerce' )
		);
	}
}