Automattic\WooCommerce\Internal\DataStores\Orders

OrdersTableDataStore::set_order_data_in_cache()privateWC 1.0

Store the raw data for a set of orders in cache.

Method of the class: OrdersTableDataStore{}

No Hooks.

Return

null. Nothing (null).

Usage

// private - for code of main (parent) class only
$result = $this->set_order_data_in_cache( $order_data );
$order_data(\stdClass[][]) (required)
An array of raw order records to set in cache keyed by the order IDs.

OrdersTableDataStore::set_order_data_in_cache() code WC 9.6.0

private function set_order_data_in_cache( array $order_data ) {
	$cache_engine = wc_get_container()->get( WPCacheEngine::class );
	$cache_engine->cache_objects( $order_data, 0, $this->get_cache_group() );
}