Automattic / woocommerce-subscriptions-core

Subscriptions core package for WooCommerce
Other
80 stars 29 forks source link

When a subscription is added to a cart containing a product, and mixed checkout is disabled #560

Closed nicdwilson closed 2 months ago

nicdwilson commented 5 months ago

Describe the bug

When mixed checkout is disabled, and a subscription is in the cart when another product type is added, the customer is provided with a notice A subscription has been removed from your cart. Products and subscriptions can not be purchased at the same time.

bSULog.png

But when a subscription is added to the cart that already contains another product, no notice is provided.

Related: https://github.com/Automattic/woocommerce-subscriptions-core/issues/130

To Reproduce

Note the related issue does prevent testing with Ajax Add to Cart enabled. However, the code does appear to skip a notice in the case where the first time added is a product and the second a subscription

  1. Disable mixed checkout
  2. Add a simple product to the cart
  3. Add a subscription to the cart
  4. See first product is removed without a notice to the customer

Expected behavior

The behaviour should match the case where a subscription exists in the cart and another product is added after.

Actual behavior

No user feedback is provided on why the item suddenly disappears from the cart

Product impact

Additional context

7623733-zd-a8c

mattallan commented 2 months ago

Closed by #606