Automattic\WooCommerce\Internal\ProductFilters
TaxonomyHierarchyData::clear_cache
Clear hierarchy cache for a taxonomy.
Метод класса: TaxonomyHierarchyData{}
Хуков нет.
Возвращает
null. Ничего (null).
Использование
$TaxonomyHierarchyData = new TaxonomyHierarchyData(); $TaxonomyHierarchyData->clear_cache( $taxonomy ): void;
- $taxonomy(строка) (обязательный)
- The taxonomy name.
Код TaxonomyHierarchyData::clear_cache() TaxonomyHierarchyData::clear cache WC 11.2.2
public function clear_cache( string $taxonomy ): void {
// Clear in-memory cache for this taxonomy.
unset( $this->hierarchy_data[ $taxonomy ] );
// Clear only the specific taxonomy's option cache.
$cache_key = self::CACHE_GROUP . '_' . $taxonomy;
delete_option( $cache_key );
}