NO BUG: Element "Cart totals" cross-sells shows out of stock products

It may be on the edge to a bug and a logical improvement. The element “Cart totals” shows products that are not available anymore or are out of stock. There is no option to define which products or categories to show. Generally this is one of the last elements the customer sees before the final purchase, therefor a delicate topic and it would be wise to offer the customer products he can purchase?

Hi Mike,
Thanks so much for your report!

The fundamental question is how you manage to add out-of-stock items to the cart :smiley:

Normally you can’t, unless backorders are allowed (default WooCommerce behavior). This means that although the product is currently out of stock, the shop operator will reorder the item as soon as an order arrives.

Best regards,

No, it is not about the cart items but the product recommendations “cross sell” option of this element. I’m sorry I had to specify it more.
WC handling of cross sells is rudimentary and I guess there is one or more products that have out of stock products in their cross sells fields. But generally speaking the cart totals element should not serve out of stock product recommendations.

Aaaah ok, it’s about the cross-sells, I see :slight_smile:

However, this is again the default behavior of WooCommerce. When WooCommerce starts to adapt its functions, we will adopt them for our elements.

Storefront theme example:
The “V-Neck T-Shirt (Out of stock)” is out of stock (each variation has a stock of 0), but it is displayed nevertheless.

The only thing WooCommerce offers in this regard is to generally not display out-of-stock elements - this will then also affect the cross-sells: