Remove launched checkout and plan-downgrade feature flags - #113960
Remove launched checkout and plan-downgrade feature flags#113960sirbrillig wants to merge 1 commit into
Conversation
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.
|
WordPress.com
Automattic for Agencies
|
|
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
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
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
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. |
Fixes https://linear.app/a8c/issue/SHILL-2485
Proposed Changes
Removes four feature flags from all
config/*.jsonfiles along with the code that gated on them.plans/delayed-downgradeandplans/expired-downgrade— both weretruein every config, so this is a pure no-op cleanup:client/dashboard/utils/purchase.ts—isPurchaseDowngradeEligible()collapses topurchase.is_plan && purchase.is_plan_type_downgradable. The expired/refund branch was already unable to affect the result, since the unconditionaldelayedDowngradeterm short-circuited the||totrue. The now-unused@automattic/calypso-configimport is dropped.client/my-sites/plans-features-main/index.tsx— threeisEnabled()checks removed.downgradeModenow keys purely off the refund window and expiry.purchase-notice.tsxandnotices.tsxexplaining 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—truein the WordPress.com configs butfalseinjetpack-cloud-production,jetpack-cloud-stage, andjetpack-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— gatedhasCheckoutVersion(), a helper for reading acheckoutVersionURL param during A/B tests. It has zero callers repo-wide (only the barrel re-export), sopackages/wpcom-checkout/src/checkout-version-checker.tsis 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):
/me/purchasesand the dashboard's purchase settings.Google Pay (behavior change):