It seems to me the problem isn’t solved. I’m using a modified version of the script onWooCommerce to hide certain categories from a shop. But when I use the category widget it still shows the number of products in that category but when I click on it there are no products found.