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.

Method of the class: Notes{}

No Hooks.

Return

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

Usage

$result = Notes::load_data_store();

Notes::load_data_store() code WC 8.6.1

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' )
		);
	}
}