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.8.1

apply_filters('woocommerce_change_term_counts') is found 1 times:

  • /includes/wc-term-functions.php line 529
    525
    526
    527
    528
    529
    530
    531
    532
    533
    534
    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: