Automattic\WooCommerce\Internal\ProductFilters
CacheController::clear_taxonomy_hierarchy_cache
Clear taxonomy hierarchy cache when terms are created, updated, or deleted.
Method of the class: CacheController{}
No Hooks.
Returns
null. Nothing (null).
Usage
$CacheController = new CacheController(); $CacheController->clear_taxonomy_hierarchy_cache( $term_id, $term_taxonomy_id, $taxonomy );
- $term_id(int) (required)
- Term ID.
- $term_taxonomy_id(int) (required)
- Term taxonomy ID.
- $taxonomy(string) (required)
- Taxonomy slug.
CacheController::clear_taxonomy_hierarchy_cache() CacheController::clear taxonomy hierarchy cache code WC 10.3.3
public function clear_taxonomy_hierarchy_cache( $term_id, $term_taxonomy_id, $taxonomy ) {
// Only clear cache for hierarchical taxonomies.
if ( is_taxonomy_hierarchical( $taxonomy ) ) {
$this->taxonomy_hierarchy_data->clear_cache( $taxonomy );
}
}