This topic has 6 replies, 3 voices, and was last updated 4 years, 7 months ago ago by Rose Tyler
Dear Support,
1) Try to hide the empty categories http://prntscr.com/rz3rcj
But the category page is not the widget, there is no option to hide categories, what should I do in this case?
https://exoreptiles.com/my/product-category/supplies-accessories/supplement-treatment/powder-supplement/
as I click on “Zoo MED Calcium” and it shows empty inside.
I tried the below code that given by support but is not working, it is still there and the arrangement changed:
add_filter( ‘woocommerce_product_subcategories_hide_empty’, ‘hide_empty_categories’, 10, 1 );
function hide_empty_categories ( $hide_empty ) {
$hide_empty = FALSE;
// You can add other logic here too
return $hide_empty;
}
Could you help to check on it.
Thanks a lot Support!
Hello,
Problem is that WooCommerce does not think that category is empty, we enabled the default WooCommerce theme Storefront and it displays 2 in the category but once you visit it there are no products https://gyazo.com/25c77a0cc7959476171ec4fb758b8087
We can do nothing with this. Contact WooCommerce support because it’s not related to theme.
Regards
HI there Support,
Thanks for the info.
This category products are all set as out of stock, it is because of this Woocommerce does not think it’s empty? Can we hide in another way?
Hope you can help, thanks!
Hello,
That’s strange but I have visited the mentioned category and don’t see empty subcategories any more. Could you check if you still have any empty categories? Maybe WooCommerce database update solved the issue.
Regards
Dear Olga,
Just checked it and looks okay now.
By the way, thanks a lot for your helped.
Hello,
You’re welcome!
Regards
You must be logged in to reply to this topic.Log in/Sign up