woocommerce_change_term_counts

woocommerce_change_term_counts

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter
See hook in action

See hook in core

Displaying hooks found in version: woocommerce.9.5.1

apply_filters('woocommerce_change_term_counts') is found 1 times:

  • /includes/wc-term-functions.php line 527
    	if ( is_admin() || wp_doing_ajax() ) {
    		return $terms;
    	}
    
    	if ( ! isset( $taxonomies[0] ) || ! in_array( $taxonomies[0], apply_filters( 'woocommerce_change_term_counts', array( 'product_cat', 'product_tag' ) ), true ) ) {
    		return $terms;
    	}
    
    	$o_term_counts = get_transient( 'wc_term_counts' );
    	$term_counts   = false === $o_term_counts ? array() : $o_term_counts;
    
    

See this hook used in plugins: