Abstract_WC_Order_Data_Store_CPT::prime_needs_processing_transientsprotectedWC 10.7.0

Deprecated since 0.8.0. It is no longer supported and may be removed in future releases. Use s transients instead.

Prime the needs_processing transient cache for a batch of orders.

WC_Order::needs_processing() calls get_transient() per order, which triggers an individual wp_options query each time. By priming the object cache for all transient option names in a single query, we eliminate the N+1.

Method of the class: Abstract_WC_Order_Data_Store_CPT{}

No Hooks.

Returns

null. Nothing (null).

Usage

// protected - for code of main (parent) or child class
$result = $this->prime_needs_processing_transients( $order_ids, $query_vars );
$order_ids(array) (required)
Order IDs to prime cache for.
$query_vars(array) (required)
Query vars for the query.

Changelog

Since 10.7.0 Introduced.
Deprecated since 10.8.0 \WC_Order::needs_processing method no longer uses transients.

Abstract_WC_Order_Data_Store_CPT::prime_needs_processing_transients() code WC 10.9.4

protected function prime_needs_processing_transients( $order_ids, $query_vars ) {
}