Create a simple Subscription product as well as a variable subscription product
Create a membership plan (membership settings for the plan don't matter)
Restrict both the simple as well as variable subscription to be purchased only with an active Membership plan:
Check the Simple Subscription product and confirm that this is showing the correct notice:
Check the variable subscription product to confirm that it is showing the following notice even though there's no product in cart:
Expected behavior
Do not show incorrect notice - instead, maybe stick to a generic notice like this product cannot be added to cart in case it does not meet any of the existing conditions that prevent the product from being added to cart.
Actual behavior
Variable product shows You have added a variation of this product to the cart already even though there is no product in cart.
Product impact
[x] Does this issue affect WooCommerce Subscriptions? yes
[x] Does this issue affect WooCommerce Payments? no
Describe the bug
If a Variable Subscription is not purchasable, it should display a relevant / generic message rather than an incorrect notification that says the product is already in cart: /templates/single-product/add-to-cart /variable-subscription.php
To Reproduce
Use a plugin that can restrict a product. I'm using WooCommerce Memberships here.
Create a simple Subscription product as well as a variable subscription product
Create a membership plan (membership settings for the plan don't matter)
Restrict both the simple as well as variable subscription to be purchased only with an active Membership plan:
Check the Simple Subscription product and confirm that this is showing the correct notice:
Check the variable subscription product to confirm that it is showing the following notice even though there's no product in cart:
Expected behavior
Do not show incorrect notice - instead, maybe stick to a generic notice like this product cannot be added to cart in case it does not meet any of the existing conditions that prevent the product from being added to cart.
Actual behavior
Variable product shows
You have added a variation of this product to the cart already
even though there is no product in cart.Product impact
Additional context
Customer report: 7562463-zen