WordPress at Your Fingertips
function is not described

Abstract_WC_Order_Data_Store_CPT::clear_caches() protected WC 3.0.0

Clear any caches.

{} It's a method of the class: Abstract_WC_Order_Data_Store_CPT{}

No Hooks.

Return

null. Nothing.

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.

Code of Abstract_WC_Order_Data_Store_CPT::clear_caches() WC 5.8.0

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' );
}