WC_REST_Product_Variations_V2_Controller::clear_transients()publicWC 1.0

Clear caches here so in sync with any new variations.

Method of the class: WC_REST_Product_Variations_V2_Controller{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_REST_Product_Variations_V2_Controller = new WC_REST_Product_Variations_V2_Controller();
$WC_REST_Product_Variations_V2_Controller->clear_transients( $object );
$object(WC_Data) (required)
Object data.

WC_REST_Product_Variations_V2_Controller::clear_transients() code WC 8.7.0

public function clear_transients( $object ) {
	wc_delete_product_transients( $object->get_parent_id() );
	wp_cache_delete( 'product-' . $object->get_parent_id(), 'products' );
}