WC_Brands::recount_all_brands
Recount all brands.
Method of the class: WC_Brands{}
No Hooks.
Returns
null. Nothing (null).
Usage
$WC_Brands = new WC_Brands(); $WC_Brands->recount_all_brands();
WC_Brands::recount_all_brands() WC Brands::recount all brands code WC 10.4.3
public function recount_all_brands() {
$product_brands = get_terms(
array(
'taxonomy' => 'product_brand',
'hide_empty' => false,
'fields' => 'id=>parent',
)
);
_wc_term_recount( $product_brands, get_taxonomy( 'product_brand' ), true, false );
}