Get all terms if product of that term contains a specific category


I am using below code for get all product tags:

$tags = get_terms('product_tag', 'orderby=name&hide_empty=1');

However, I want to show only those tags in which product having these tags but must contain a specific product category like shop.

Mean if a product1 contains tag1 and shop category
product2 contains tag2 and any other category, then only tag1 will show.

, meenakshi 5 years 2016-09-14T14:39:17-05:00 0 Answers 64 views 0

Leave an answer