Skip to content

Conversation

@dkoo
Copy link
Contributor

@dkoo dkoo commented May 9, 2024

All Submissions:

Changes proposed in this Pull Request:

Respects the "Limit subscription" option in Woo products. Also implements some styles so that the modal checkout window is still usable if the add_to_cart method fails and redirects to the cart page inside the modal.

Closes 1200550061930446/1207095202849399.

How to test the changes in this Pull Request:

  1. Ensure you have two subscription products published: a simple subscription and a variable one (see the Woo documentation for details on how to set up).
  2. For each product, in Product data > Advanced, set the "Limit subscription" option to "Limit to one active subscription".
Screenshot 2024-05-09 at 4 53 19 PM
  1. Publish a page or post with Checkout Button blocks for each product.
  2. As a reader, purchase a subscription for each product using the Checkout Button blocks.
  3. After purchasing, while still logged in as the reader, attempt to purchase each product again.
  4. On trunk, observe that the modal checkout window displays the full Cart page with site header + footer, locked behind a loading animation that never resolves.
Screenshot 2024-05-09 at 5 02 15 PM
  1. Check out this branch. Repeat step 6 and confirm that you now see a more graceful error message in the modal, along with a button that closes the modal when clicked.
Screenshot 2024-05-09 at 4 50 33 PM
  1. As an admin, cancel the reader's subscriptions for both products.
  2. Repeat step 7 and confirm that you can now repurchase those products.
  3. As an admin, for each product, change the "Limit subscription" option to "Limit to one of any status".
  4. Repeat step 7 and confirm that you still see the same error message as before.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully ran tests with your changes locally?

@dkoo dkoo self-assigned this May 9, 2024
@dkoo dkoo requested a review from a team as a code owner May 9, 2024 23:04
@dkoo dkoo requested a review from adekbadek May 13, 2024 17:01
@dkoo dkoo merged commit 8a828fa into trunk May 13, 2024
@dkoo dkoo deleted the fix/respect-subscriptions-limit branch May 13, 2024 17:49
@dkoo dkoo mentioned this pull request May 13, 2024
6 tasks
matticbot pushed a commit that referenced this pull request May 20, 2024
# [3.2.0-alpha.1](v3.1.0...v3.2.0-alpha.1) (2024-05-20)

### Bug Fixes

* **donate-block:** fix typo in textdomain and color variables ([#1738](#1738)) ([7f7de88](7f7de88))
* modal checkout continue button ([#1733](#1733)) ([c672d4a](c672d4a))
* respect subscriptions limiter, and handle cart errors in modal ([#1728](#1728)) ([8a828fa](8a828fa))

### Features

* **donate:** add new "Modern" style variation ([#1734](#1734)) ([b83d840](b83d840))
* update donations patterns and add new one ([#1731](#1731)) ([607c93a](607c93a))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.2.0-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.1.0-epic-ras-acc.13 🎉

The release is available on:

Your semantic-release bot 📦🚀

@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.2.0-epic-ras-acc.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

matticbot pushed a commit that referenced this pull request May 28, 2024
# [3.2.0](v3.1.0...v3.2.0) (2024-05-28)

### Bug Fixes

* **donate-block:** fix typo in textdomain and color variables ([#1738](#1738)) ([7f7de88](7f7de88))
* modal checkout continue button ([#1733](#1733)) ([c672d4a](c672d4a))
* respect subscriptions limiter, and handle cart errors in modal ([#1728](#1728)) ([8a828fa](8a828fa))

### Features

* **donate:** add new "Modern" style variation ([#1734](#1734)) ([b83d840](b83d840))
* update donations patterns and add new one ([#1731](#1731)) ([607c93a](607c93a))
@matticbot
Copy link
Contributor

🎉 This PR is included in version 3.2.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants