Product categories in sidebar based on current products
In my wo-commerce website, I am showing product category list in sidebar. When I go to a product specific page then in sidebar product category list is showing only children of current category, because in widget setting I have checked “Only show children of the current category”. This is fine.
But when I go to a shop page/ search result page/ product brand page then it shows all categories list. In this case it should show only those category list, from which these(current/searched) products belong. How to do this?