Skip to content

Conversation

@chrismccluskey
Copy link
Contributor

Closes SHILL-1278

Proposed Changes

  • Connect v2 cancel flow to v2 settings page
  • Remove old code needed to redirect to v1 cancel flow

Why are these changes being made?

  • The cancellation flow in the dashboard is working well enough that we can let customers who have opted in to the dashboard use it.
  • The code created to facilitate redirection to the v1 cancel flow is no longer needed and can be removed.

Testing Instructions

  • Visit /v2/me/billing/purchases and select a purchase that you'd like to cancel, choosing "Manage purchase" for that row.
  • Click "downgrade or cancel" or click "Remove plan" and you should be redirected to the v2 cancellation flow.
  • Visit /me/purchases and select a purchase that you'd like to cancel, choosing "Manage purchase" for that row.
  • Clicking "Cancel" or "remove" buttons should work as normal with no regressions.

Pre-merge Checklist

  • Has the general commit checklist been followed? (PCYsg-hS-p2)
  • Have you written new tests for your changes?
  • Have you tested the feature in Simple (P9HQHe-k8-p2), Atomic (P9HQHe-jW-p2), and self-hosted Jetpack sites (PCYsg-g6b-p2)?
  • Have you checked for TypeScript, React or other console errors?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • For changes affecting Jetpack: Have we added the "[Status] Needs Privacy Updates" label if this pull request changes what data or activity we track or use (p4TIVU-aUh-p2)?

@chrismccluskey chrismccluskey marked this pull request as ready for review November 21, 2025 00:25
@chrismccluskey chrismccluskey requested review from a team as code owners November 21, 2025 00:25
@github-actions
Copy link

github-actions bot commented Nov 21, 2025

@matticbot matticbot added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 21, 2025
@matticbot
Copy link
Contributor

matticbot commented Nov 21, 2025

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

App Entrypoints (~16 bytes removed 📉 [gzipped])

name                    parsed_size           gzip_size
entry-subscriptions           -49 B  (-0.0%)      -20 B  (-0.0%)
entry-stepper                 -49 B  (-0.0%)      -20 B  (-0.0%)
entry-reauth-required         -49 B  (-0.0%)      -20 B  (-0.0%)
entry-main                    -49 B  (-0.0%)      -20 B  (-0.0%)
entry-login                   -49 B  (-0.0%)      -20 B  (-0.0%)
entry-dashboard-dotcom        +41 B  (+0.0%)       -1 B  (-0.0%)
entry-dashboard-ciab          +41 B  (+0.0%)       -1 B  (-0.0%)

Common code that is always downloaded and parsed every time the app is loaded, no matter which route is used.

Sections (~64 bytes removed 📉 [gzipped])

name                parsed_size           gzip_size
purchases                -715 B  (-0.0%)      -73 B  (-0.0%)
site-purchases           -190 B  (-0.0%)      -36 B  (-0.0%)
overview                 -102 B  (-0.0%)      -16 B  (-0.0%)
domains                  -102 B  (-0.0%)      -16 B  (-0.0%)
staging-site              +41 B  (+0.0%)       +9 B  (+0.0%)
sites-dashboard           +41 B  (+0.0%)       +9 B  (+0.0%)
site-settings             +41 B  (+0.0%)       +9 B  (+0.0%)
site-performance          +41 B  (+0.0%)       +9 B  (+0.0%)
site-monitoring           +41 B  (+0.0%)       +9 B  (+0.0%)
site-logs                 +41 B  (+0.0%)       +9 B  (+0.0%)
plans                     +41 B  (+0.0%)       +9 B  (+0.0%)
hosting                   +41 B  (+0.0%)       +9 B  (+0.0%)
github-deployments        +41 B  (+0.0%)       +9 B  (+0.0%)

Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to.

Async-loaded Components (~14 bytes removed 📉 [gzipped])

name                                                        parsed_size           gzip_size
async-load-calypso-state-lib-automated-transfer-middleware        -49 B  (-0.1%)      -14 B  (-0.1%)

React components that are loaded lazily, when a certain part of UI is displayed for the first time.

Legend

What is parsed and gzip size?

Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

Generated by performance advisor bot at iscalypsofastyet.com.

Copy link
Member

@sirbrillig sirbrillig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

One thing I immediately notice, though, is that for some reason the breadcrumbs on the cancel page do not include the purchase settings page.

Image

It should look like the "update payment method" page:

Image

I think this may be due to the path property of the cancel route. I see that changePaymentMethodRoute has path: 'payment-method/change' but cancelPurchaseRoute has path: 'cancel' Nevermind. I'm wrong about that.

@sirbrillig
Copy link
Member

sirbrillig commented Nov 21, 2025

I figured it out. There were two issues with the Breadcrumbs:

  1. The cancel page didn't have a meta title set in the router.
  2. The breadcrumbs were too short.
Screenshot 2025-11-21 at 5 35 03 PM

Copy link
Member

@sirbrillig sirbrillig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@matticbot
Copy link
Contributor

This PR modifies the release build for the following Calypso Apps:

For info about this notification, see here: PCYsg-OT6-p2

  • blaze-dashboard
  • help-center
  • notifications
  • wpcom-block-editor

To test WordPress.com changes, run install-plugin.sh $pluginSlug add/msd-cancel-flow-to-manage-purchase-page on your sandbox.

@chrismccluskey chrismccluskey merged commit 9741dbc into trunk Nov 22, 2025
12 checks passed
@chrismccluskey chrismccluskey deleted the add/msd-cancel-flow-to-manage-purchase-page branch November 22, 2025 00:10
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants