Recount true when recounting terms Fixes #5320
This commit is contained in:
parent
9c37d83f11
commit
558a7bbe25
|
@ -105,11 +105,11 @@ class WC_Admin_Status {
|
||||||
|
|
||||||
$product_cats = get_terms( 'product_cat', array( 'hide_empty' => false, 'fields' => 'id=>parent' ) );
|
$product_cats = get_terms( 'product_cat', array( 'hide_empty' => false, 'fields' => 'id=>parent' ) );
|
||||||
|
|
||||||
_wc_term_recount( $product_cats, get_taxonomy( 'product_cat' ), false, false );
|
_wc_term_recount( $product_cats, get_taxonomy( 'product_cat' ), true, false );
|
||||||
|
|
||||||
$product_tags = get_terms( 'product_tag', array( 'hide_empty' => false, 'fields' => 'id=>parent' ) );
|
$product_tags = get_terms( 'product_tag', array( 'hide_empty' => false, 'fields' => 'id=>parent' ) );
|
||||||
|
|
||||||
_wc_term_recount( $product_tags, get_taxonomy( 'product_tag' ), false, false );
|
_wc_term_recount( $product_tags, get_taxonomy( 'product_tag' ), true, false );
|
||||||
|
|
||||||
delete_transient( 'wc_term_counts' );
|
delete_transient( 'wc_term_counts' );
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue