Abstract_WC_Order_Item_Type_Data_Store::clear_cache()publicWC 1.0

Clear meta cache.

Method of the class: Abstract_WC_Order_Item_Type_Data_Store{}

No Hooks.

Return

null. Nothing (null).

Usage

$Abstract_WC_Order_Item_Type_Data_Store = new Abstract_WC_Order_Item_Type_Data_Store();
$Abstract_WC_Order_Item_Type_Data_Store->clear_cache( $item );
$item(WC_Order_Item) (required) (passed by reference — &)
Order item object.

Abstract_WC_Order_Item_Type_Data_Store::clear_cache() code WC 9.4.2

public function clear_cache( &$item ) {
	wp_cache_delete( 'item-' . $item->get_id(), 'order-items' );
	wp_cache_delete( 'order-items-' . $item->get_order_id(), 'orders' );
	wp_cache_delete( $item->get_id(), $this->meta_type . '_meta' );
}