Abstract_WC_Order_Data_Store_CPT::clear_caches()
Clear any caches.
Method of the class: Abstract_WC_Order_Data_Store_CPT{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->clear_caches( $order );
- $order(WC_Order) (required) (passed by reference — &)
- Order object.
Changelog
Since 3.0.0 | Introduced. |
Abstract_WC_Order_Data_Store_CPT::clear_caches() Abstract WC Order Data Store CPT::clear caches code WC 9.4.2
protected function clear_caches( &$order ) { clean_post_cache( $order->get_id() ); wc_delete_shop_order_transients( $order ); wp_cache_delete( 'order-items-' . $order->get_id(), 'orders' ); }