Proposed Changes
- Displays the following Dialog in both Cancellation flow and Cancellation and refund flow
- The Dialog is displayed when the user tries to either Remove or Cancel a Plan, and it has active Marketplace subscriptions. For example, the user has WooCommerce Bookings and a Businesss plan and tries to remove or cancel the Business plan.
- The following is a table with three different scenarios when removing/cancelling a purchase
Note That some recent changes have changed the wordings and removed the and Refund
words, comment here
Removal Flow |
Cancellation Flow |
Cancellation and Refund Flow |
` |
|
|
- This PR will only affect the Cancellation flow (the last two columns above), and the existing Removal flow (first column) has not been modified
- The changes suggested are:
- Update the logic in the cancellation flow to display the modal when cancelling a plan
- Iterate over all the subscriptions and either cancel or cancel and refund them when required
- Adds two new async methods that will be used in the previous log instead of using callbacks
Testing Instructions
Scenario 1: Cancel and Refund:
- Go to https://wordpress.com/
- Switch to a Simple site
- Purchase a Business plan with a credit card (you can use the Sandbox store if you don’t want to enter an actual credit card: PCYsg-IA-p2#sandbox)
- Go to Plugins
- Purchase a paid plugin with a credit card
- Go to Upgrades > Purchases
- Cancel and Refund the Business plan
- Make sure a Dialog is displayed asking for confirmation. The Dialog should refer to the
Cancel
flow instead of Remove
in the wordings.
- Click on
Continue
- Make sure that both the plan and the subscriptions have been cancelled and refunded.
Scenario 2: Cancel:
- Go to https://wordpress.com/
- Switch to a Business site that was purchased with a credit card more than 14 days ago
- Go to Plugins
- Purchase a paid plugin with a credit card
- Make sure the plugin has auto-renew activated -> Auto-renew is ON
- Go to Upgrades > Purchases
- Cancel the Business plan
- Make sure a Dialog is displayed asking for confirmation. The Dialog should refer to the
Cancel
flow instead of Remove
in the wordings.
- Click on
Continue
- Make sure that the plan is cancelled and the subscription auto-renew is OFF
Scenario 3: Removal flow (this is to check there is no regression in existing functionality):
Pre-merge Checklist
Complete applicable items on this checklist before merging into trunk. Inapplicable items can be left unchecked.
Both the PR author and reviewer are responsible for ensuring the checklist is completed.
Fixes #65235
Unfortunately, no screenshots were provided by the developer.