Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace limited-subscription-notice with something more relevant when no variation is added to cart #557

Open
2 tasks done
AashikP opened this issue Jan 12, 2024 · 0 comments
Labels
type: bug The issue is a confirmed bug.

Comments

@AashikP
Copy link

AashikP commented Jan 12, 2024

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.

  1. Create a simple Subscription product as well as a variable subscription product

  2. Create a membership plan (membership settings for the plan don't matter)

  3. Restrict both the simple as well as variable subscription to be purchased only with an active Membership plan:

    mjyB0V.png

  4. Check the Simple Subscription product and confirm that this is showing the correct notice:

    AWmOTU.png

  5. Check the variable subscription product to confirm that it is showing the following notice even though there's no product in cart:

    2nmwej.png

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

  • Does this issue affect WooCommerce Subscriptions? yes
  • Does this issue affect WooCommerce Payments? no

Additional context

Customer report: 7562463-zen

@AashikP AashikP added the type: bug The issue is a confirmed bug. label Jan 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug The issue is a confirmed bug.
Projects
None yet
Development

No branches or pull requests

1 participant