• Resolved devmitrovics

    (@devmitrovics)


    Hi,
    my theme displays cross sell products on cart page which is fine, but i dont want to display products which are out of the stock. I managed to change number of columns for cross sells etc but i cant find anywhere some snippet that displays only available products (not out of the stock) as a cross sell. Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support kellymetal a11n

    (@kellymetal)

    Hi there,

    I understand you are trying to hide out of stock products from the cross-sells in your Cart Page.

    Testing on my site, it appears the “Hide out of stock” setting in the WooCommerce > Settings > Products > Inventory page will hide them from the Cross Sells section on the Cart page as well:

    Hide out of stock
    Link to image: https://d.pr/i/u87TQm

    If you wanted to display them in the Shop, but only hide them in the Cart though, then that would require some customization.

    This guide has some explanation of how to hide them only from “Related products”, but not the shop:
    https://iconicwp.com/blog/hide-stock-products-related-products-woocommerce/

    You will need to update that to check the cart/cross-sells.php template file instead of the single-product/related.php file.

    If you need assistance with coding or custom development, we recommend reaching out to a developer from one of the services at https://woocommerce.com/customizations/.

    I hope that helps! Have a wonderful day!

    Plugin Support Yuki K a11n.

    (@yukikatayama)

    Automattic Happiness Engineer

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Woocommerce and Cross Sells – Out of the stock’ is closed to new replies.