Terms fix

This commit is contained in:
Mike Jolley 2013-10-14 20:20:47 +01:00
parent 5a5e563522
commit 58787aa7b8
1 changed files with 1 additions and 4 deletions

View File

@ -516,10 +516,7 @@ function woocommerce_change_term_counts( $terms, $taxonomies, $args ) {
if ( is_admin() || is_ajax() )
return $terms;
if ( ! isset( $taxonomies[0] ) || ! is_array( $taxonomies[0] ) )
return $terms;
if ( ! in_array( $taxonomies[0], apply_filters( 'woocommerce_change_term_counts', array( 'product_cat', 'product_tag' ) ) ) )
if ( ! isset( $taxonomies[0] ) || ! in_array( $taxonomies[0], apply_filters( 'woocommerce_change_term_counts', array( 'product_cat', 'product_tag' ) ) ) )
return $terms;
$term_counts = $o_term_counts = get_transient( 'wc_term_counts' );