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

Question

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.

0
, meenakshi 4 years 0 Answers 51 views 0

Leave an answer