I've got a custom taxonomy "sector" associated to WooCommerce products; of course each productsposts; posts are assigned to the default Product categories ("product_cat") as well. What I'd like to achieve is to show in a custom sidebar a list of "Product category""categories" link/name, the productpost of which are assigned to the selected "sector".
Eg.: say that my data arare organized like this (hope this make sense), with three productsposts associated to a various "Product categories"categories AND to a particular sector:
ProductPost 1
- product_catcategory: category_1
- sector: sector_1
ProductPost 2
- product_catcategory: category_2
- sector: sector_1
ProductPost 3
- product_catcategory: category_3
- sector: sector_1
Now, when I'm in the "sector_1" archive page, in the sidebar I'd like to show the following list:
- category_1
- category_2
- category_3
Is this possible? Maybe using tax_query or other methods?