WC_Order_Data_Store_CPT::prime_caches_for_orders()publicWC 1.0

Helper method to prime caches for orders. Call this if you are going to be fetching orders in a loop.

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

Хуков нет.


null. Ничего (null).


$WC_Order_Data_Store_CPT = new WC_Order_Data_Store_CPT();
$WC_Order_Data_Store_CPT->prime_caches_for_orders( $order_ids, $query_vars );
$order_ids(массив) (обязательный)
List of order IDS to prime caches for.
$query_vars(массив) (обязательный)
Original query arguments.

Код WC_Order_Data_Store_CPT::prime_caches_for_orders() WC 8.1.1

public function prime_caches_for_orders( $order_ids, $query_vars ) {
	// Lets do some cache hydrations so that we don't have to fetch data from DB for every order.
	$this->prime_raw_meta_cache_for_orders( $order_ids, $query_vars );
	$this->prime_refund_caches_for_order( $order_ids, $query_vars );
	$this->prime_order_item_caches_for_orders( $order_ids, $query_vars );