>Remove WooCommerce Category Product Count

Remove WooCommerce Category Product Count

Here is a quick snippet to remove products count after categories names using WooCommerce. It’s pretty useful in particular when your main shop page list categories instead of listing products.

To do that, edit the woo-config.php file inside your theme folder/includes.

So check and edit /[theme]/includes/woo-config.php, adding the following at the script:

Add as follow and the trick is done!

* Removes products count after categories name
add_filter( ‘woocommerce_subcategory_count_html’, ‘woo_remove_category_products_count’ );
function woo_remove_category_products_count() {