I installed the woocommerce plugin.
my page url is like this http://sitename.com/product-category/products-and-service/servicecat1/
products-and-service - is the main category servicecat1 - is the sub category
In this page the list of products are displayed.
I want to get the category id of the subcategory (i.e servicecat1)
I used the following code
$q_cat = get_query_var('cat');
$term_list = wp_get_post_terms('servicecat1','product_cat');
But it is not working.
How to get this id. I used this code in content-product.php
Please help to get this.