Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::get_cpt_data_store_instance()publicWC 1.0

Helper method to get a CPT data store instance to use.

{} It's a method of the class: OrdersTableDataStore{}

No Hooks.

Return

\WC_Order_Data_Store_CPT. Data store instance.

Usage

$OrdersTableDataStore = new OrdersTableDataStore();
$OrdersTableDataStore->get_cpt_data_store_instance();

Code of OrdersTableDataStore::get_cpt_data_store_instance() WC 7.1.0

public function get_cpt_data_store_instance() {
	if ( ! isset( $this->cpt_data_store ) ) {
		$this->cpt_data_store = $this->get_post_data_store_for_backfill();
	}
	return $this->cpt_data_store;
}