woocommerce_change_term_counts

woocommerce_change_term_counts

Appears in: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Hook Type: filter

See hook in core

Displaying hooks found in version: woocommerce.8.7.0

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;