Skip to content

Instantly share code, notes, and snippets.

@Rhoteh
Forked from rynaldos-zz/wc-remove-subcounts.php
Created July 5, 2020 23:08
Show Gist options
  • Save Rhoteh/7b0e9d4995067e12d27cfd6b80b2fc8c to your computer and use it in GitHub Desktop.
Save Rhoteh/7b0e9d4995067e12d27cfd6b80b2fc8c to your computer and use it in GitHub Desktop.
[WooCommerce 3.0] Remove brackets from product category counts
add_filter( 'woocommerce_subcategory_count_html', 'wc_filter_woocommerce_subcat_count_html', 10, 2 );
function wc_filter_woocommerce_subcat_count_html( $mark_class_count_category_count_mark, $category ) {
$mark_class_count_category_count_mark = ' <mark class="count">' . $category->count . '</mark>';
return $mark_class_count_category_count_mark;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment