Automattic\WooCommerce\Internal\Caches
ProductTransientsDeferrer::flush
Delete transients for all collected product IDs and reset the collection.
Method of the class: ProductTransientsDeferrer{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->flush(): void;
ProductTransientsDeferrer::flush() ProductTransientsDeferrer::flush code WC 11.0.0
private function flush(): void {
if ( empty( $this->deferred_product_ids ) ) {
return;
}
$product_ids = array_keys( $this->deferred_product_ids );
$this->deferred_product_ids = array();
$this->product_util->delete_product_transients_for_products( $product_ids );
}