Shortcode with product catgory counter

I would like to create a custom shortcode that count individually product-categories in Woocomerce but I haven’t found any code on net. I need somethink like:

[counter product-category=”example”]

Anyone can help me? I’ve no idea about php 🙁

<?php
$product_categories = get_terms( ‘product_cat’, $args );
$count = count($product_categories);
?>

Read more here:: Shortcode with product catgory counter

Leave a Reply

Your email address will not be published. Required fields are marked *