Skip to content

Remove launched checkout and plan-downgrade feature flags - #113960

Open
sirbrillig wants to merge 1 commit into
trunkfrom
update/remove-launched-checkout-and-downgrade-flags
Open

Remove launched checkout and plan-downgrade feature flags#113960
sirbrillig wants to merge 1 commit into
trunkfrom
update/remove-launched-checkout-and-downgrade-flags

Conversation

@sirbrillig

@sirbrillig sirbrillig commented Aug 31, 2026

Copy link
Copy Markdown
Member

Fixes https://linear.app/a8c/issue/SHILL-2485

Proposed Changes

Removes four feature flags from all config/*.json files along with the code that gated on them.

plans/delayed-downgrade and plans/expired-downgrade — both were true in every config, so this is a pure no-op cleanup:

  • client/dashboard/utils/purchase.tsisPurchaseDowngradeEligible() collapses to purchase.is_plan && purchase.is_plan_type_downgradable. The expired/refund branch was already unable to affect the result, since the unconditional delayedDowngrade term short-circuited the || to true. The now-unused @automattic/calypso-config import is dropped.
  • client/my-sites/plans-features-main/index.tsx — three isEnabled() checks removed. downgradeMode now keys purely off the refund window and expiry.
  • Comments in purchase-notice.tsx and notices.tsx explaining why those notices were deliberately left ungated (so a pending downgrade stayed visible if the flag were used as a kill switch) no longer describe anything and are removed.

checkout/google-pay⚠️ not a no-op. This flag was true in the WordPress.com configs but false in jetpack-cloud-production, jetpack-cloud-stage, and jetpack-cloud-development. I believe this was an oversight many years ago when we launched Google Pay support. Removing it enables Google Pay in Jetpack Cloud checkout.

checkout/checkout-version — gated hasCheckoutVersion(), a helper for reading a checkoutVersion URL param during A/B tests. It has zero callers repo-wide (only the barrel re-export), so packages/wpcom-checkout/src/checkout-version-checker.ts is deleted rather than just ungated. Note this drops a named export from @automattic/wpcom-checkout, which is not marked private — fine within the monorepo, but technically a breaking change for any external consumer.

Why are these changes being made?

All four flags are launched. Leaving permanently-on flags in place adds dead branches that make the downgrade and checkout paths harder to read, and it obscures which behavior actually ships.

Testing Instructions

Plan downgrades (no behavior change expected):

  1. Visit the plans page for a site with an active, downgradable paid plan. Selecting a lower plan should still open the delayed-downgrade confirmation and schedule the downgrade at renewal.
  2. Repeat for a site whose plan is within its refund window — the instant-downgrade modal should still appear.
  3. Repeat for a site with an expired plan — the downgrade should still route to checkout.
  4. On a purchase with a pending delayed downgrade, confirm the persistent warning notice and its cancel button still render in both /me/purchases and the dashboard's purchase settings.

Google Pay (behavior change):

  1. In WordPress.com checkout on a Google Pay–capable browser, confirm Google Pay still appears as before.
  2. In Jetpack Cloud checkout, confirm Google Pay now appears and completes a purchase correctly. This is the new behavior introduced by this PR.

Removes four feature flags and their gating code:

- plans/delayed-downgrade
- plans/expired-downgrade
- checkout/google-pay
- checkout/checkout-version

The two plans/* flags were true in every config, so their removal is a
no-op refactor. checkout/google-pay was false in the jetpack-cloud-*
configs, so this also enables Google Pay in Jetpack Cloud checkout.
checkout/checkout-version gated hasCheckoutVersion(), which had no
callers, so the whole helper is deleted.
@sirbrillig sirbrillig self-assigned this Aug 31, 2026
@sirbrillig
sirbrillig marked this pull request as ready for review August 31, 2026 22:03
@sirbrillig
sirbrillig requested review from a team as code owners August 31, 2026 22:03
@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 Aug 31, 2026
@github-actions

Copy link
Copy Markdown

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

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

Details
Name Parsed Gzip
entry-dashboard-ciab -193 B -0.0% -56 B -0.0%
entry-dashboard-a4a -193 B -0.0% -56 B -0.0%
entry-dashboard-dotcom -193 B -0.0% -56 B -0.0%

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

Sections (~961 bytes removed 📉 [gzipped])

Details
Name Parsed Gzip
plans -333 B -0.0% -76 B -0.0%
plugins -333 B -0.0% -95 B -0.0%
a8c-for-agencies-express-checkout -226 B -0.0% -110 B -0.0%
a8c-for-agencies-client -226 B -0.0% -110 B -0.0%
a8c-for-agencies-marketplace -226 B -0.0% -110 B -0.0%
checkout -226 B -0.0% -110 B -0.0%
site-purchases -226 B -0.0% -93 B -0.0%
purchases -226 B -0.0% -93 B -0.0%
a8c-for-agencies-plugins -193 B -0.0% -76 B -0.0%
a8c-for-agencies-sites -193 B -0.0% -66 B -0.0%
staging-site -193 B -0.0% -56 B -0.0%
github-deployments -193 B -0.0% -56 B -0.0%
site-logs -193 B -0.0% -56 B -0.0%
site-performance -193 B -0.0% -56 B -0.0%
site-monitoring -193 B -0.0% -56 B -0.0%
jetpack-cloud-pricing -193 B -0.0% -64 B -0.0%
jetpack-cloud-settings -193 B -0.0% -71 B -0.0%
jetpack-cloud-plugin-management -193 B -0.0% -76 B -0.0%
scan -193 B -0.0% -66 B -0.0%
backup -193 B -0.0% -66 B -0.0%
site-settings -193 B -0.0% -56 B -0.0%
home -193 B -0.0% -76 B -0.0%
reader -193 B -0.0% -57 B -0.0%
email -193 B -0.0% -61 B -0.0%
domains -193 B -0.0% -56 B -0.0%
theme -193 B -0.0% -76 B -0.0%
themes -193 B -0.0% -76 B -0.0%
google-my-business -193 B -0.0% -61 B -0.0%
stats -193 B -0.0% -61 B -0.0%
jetpack-connect -193 B -0.0% -67 B -0.0%
hosting -193 B -0.0% -56 B -0.0%
overview -193 B -0.0% -56 B -0.0%
settings -193 B -0.0% -75 B -0.0%
settings-performance -193 B -0.0% -80 B -0.0%
marketplace -193 B -0.0% -76 B -0.0%
me -193 B -0.1% -56 B -0.1%
site-blocks -193 B -0.1% -56 B -0.1%
security -193 B -0.0% -56 B -0.0%
privacy -193 B -0.1% -56 B -0.1%
notification-settings -193 B -0.0% -56 B -0.0%
developer -193 B -0.1% -56 B -0.1%
account-close -193 B -0.1% -56 B -0.1%
account -193 B -0.0% -56 B -0.0%
sites-dashboard -193 B -0.0% -56 B -0.0%
async-step-unified-plans -140 B -0.0% -17 B -0.0%
jetpack-app -140 B -0.0% -24 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 (~134 bytes removed 📉 [gzipped])

Details
Name Parsed Gzip
async-load-calypso-my-sites-store-app-store-stats-listview -193 B -0.1% -61 B -0.1%
async-load-calypso-my-sites-store-app-store-stats -193 B -0.0% -61 B -0.1%
async-load-calypso-layout-masterbar-omnibar -193 B -0.0% -56 B -0.0%
async-load-calypso-my-sites-customer-home-celebrate-site-... -193 B -0.0% -56 B -0.0%
async-load-signup-steps-plans-theme-preselected -140 B -0.0% -17 B -0.0%
async-load-signup-steps-plans -140 B -0.0% -17 B -0.0%

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.

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

Labels

[Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants