• Resolved savvae

    (@savvae)


    I want to disable showing the out-of-stock products in up-sell and cross-sell.
    somehow with PHP. I know that I can disable it from the dashboard, but when it removes the out-of-stock from the whole website, I don’t want that.
    The idea is if I have set 5 products for up-sell and 2 are out of stock I want the up-sell to display the remaining 3 in-stock products

    The only solutions I found either disable all out-of-stock from the website or work as CSS display: none. Neither of which gives the needed result.

Viewing 1 replies (of 1 total)
  • Hi there @savvae,

    Thanks for reaching out!

    I believe that you can add some custom code to your theme’s functions.php file using this Code Snippets plugin to achieve this.

    Please take a look at this post for specifics and some example PHP code to try.

    If that doesn’t work for you, could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.

    Thanks!

Viewing 1 replies (of 1 total)
  • The topic ‘Remove the out of stock from upsell and cross sell’ is closed to new replies.