Changes proposed in this Pull Request
This implements the site-level view for a single subscription cancelation flow at the route /purchases/subscriptions/:site/:purchaseId/cancel
, mirroring the account-level route for a single subscription which exists at the route /me/purchases/:site/:purchaseId/cancel
.
The new route will be available only with the feature flag site-level-billing
, which is enabled for development and horizon only.
Related to (and builds upon) the site-level purchases list added in #45601 and the subscription view from #45922
Main project thread: pbOQVh-sc-p2
Screenshots
Testing instructions
- Visit
/purchases/subscriptions
.
- If you have multiple sites, verify that you see a site picker and that picking a site adds the site slug to the URL.
- Click on a purchase in the list.
- Verify that you are redirected to
/purchases/subscriptions/:site/:purchaseId
, and that you see the purchase listed.
- Click on “Cancel subscription and refund” (NOTE: this must be a refundable purchase to see that link!)
- Verify that you are redirected to
/purchases/subscriptions/:site/:purchaseId/cancel
, that the sidebar remains at the site-level, and that you see the purchase listed.
- Click the “Back” button in the header inside the page, and verify that you are redirected back to the site-level purchase.
- Verify that the “Cancel Subscription” button works and that you are redirected back to a site-level purchases page.
- (TBD) Test the other links in the cancel flow.
Partially addresses #45679
Unfortunately, no screenshots were provided by the developer.