Skip to content

Instantly share code, notes, and snippets.

@anestan
Created February 13, 2017 15:52
Show Gist options
  • Save anestan/ddbc4f3d2af3135338a5ac6d490c832d to your computer and use it in GitHub Desktop.
Save anestan/ddbc4f3d2af3135338a5ac6d490c832d to your computer and use it in GitHub Desktop.
Modify product category count
add_filter('woocommerce_subcategory_count_html', 'my_subcategory_filter', 10, 2);
function my_subcategory_filter($markup, $category) {
return '<div class="my_new_class">' . $category->count . ' subcategories</div>';
}
@anestan
Copy link
Author

anestan commented Feb 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment