Automattic\WooCommerce\Internal\Caches
ProductTransientsDeferrer::flush
Delete transients for all collected product IDs and reset the collection.
Метод класса: ProductTransientsDeferrer{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
// private - только в коде основоного (родительского) класса $result = $this->flush(): void;
Код ProductTransientsDeferrer::flush() ProductTransientsDeferrer::flush WC 11.0.1
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 );
}