• Resolved akalwp

    (@akalwp)


    When all products from a specific category have as parameter “visibility = 0”, their product page still exist but those products are hidden from their category. So basically, the woocommerce product category should be hidden from the list of categories, right ? At least I was expecting this as a native behavior from woocommerce.
    However, woocommerce does not seem to act like this and the category is still visible, even if it is empty. Some people tried to found a way here in the git (thx to
    DarkAllMan) = https://gist.github.com/DarkAllMan/cffb114eb97c6f26882e54793e023587
    But the fact is this does not work anymore… (throwing fatal error as explained in comment).
    His there anybody here that is able to suggest a fix for this very usefull function ?

    Edit : I’ve also tried this function = https://chrisk.io/woocommerce-hide-categories-with-no-visible-products-in-the-product-category-widget/
    this is working from the main shop page view but not when we are in a product category page view and single product page view… any ideas ?

    • This topic was modified 3 years, 3 months ago by akalwp.
    • This topic was modified 3 years, 3 months ago by akalwp.
    • This topic was modified 3 years, 3 months ago by akalwp.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Mirko P.

    (@rainfallnixfig)

    Hello @akalwp

    This is a fairly complex development topic. I’m going to leave it open for a bit to see if anyone is able to chime in to help you out.

    I can also recommend the WooCommerce Developer Resources Portal for resources on developing for WooCommerce.

    You can also visit the WooCommerce Facebook Community group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there, as well.

    Cheers.

    Mirko P.

    (@rainfallnixfig)

    Hi there,

    We’ve not seen any activity on this thread for a while, so I’m marking this thread as resolved.

    Hopefully, you were able to find a solution and the above resources for developers were helpful. If you have further questions, please feel free to open a new topic.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Hide Empty Categories’ is closed to new replies.