Automattic\WooCommerce\Internal\DataStores\Orders
OrdersTableDataStore::set_order_data_in_cache
Store the raw data for a set of orders in cache.
Method of the class: OrdersTableDataStore{}
No Hooks.
Returns
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() OrdersTableDataStore::set order data in cache code WC 10.5.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() );
}