Skip to content

Signup launch-site: keep the plan step for free-trial sites - #113922

Open
bogiii wants to merge 5 commits into
trunkfrom
fix/launch-site-trial-plan-step
Open

Signup launch-site: keep the plan step for free-trial sites#113922
bogiii wants to merge 5 commits into
trunkfrom
fix/launch-site-trial-plan-step

Conversation

@bogiii

@bogiii bogiii commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Fixes p1787825846047019-slack-C02BGMUPFEC

Proposed Changes

  • In isPlanFulfilled (client/lib/signup/step-actions/index.js), don't exclude the plans-launch step when the site's current plan is a free-trial plan, detected by plan slug.
  • Scope the plan grid for eCommerce-trial sites: usePlanIntentFromSiteMeta now resolves an eCommerce-trial site to the plans-business-trial intent (Business + Commerce) instead of the full WPCOM plan list.
  • Added a unit test covering the eCommerce free-trial case.

Why are these changes being made?

When a site on a free trial (e.g. the eCommerce trial, ecommerce-trial-bundle-monthly) launches via start/launch-site, the flow only offered domains-launch and never let the user purchase the underlying plan.

The flow defines steps [ 'domains-launch', 'plans-launch', 'launch' ], but isPlanFulfilled skips and excludes plans-launch whenever isPaidPlan is true. isPaidPlan comes from isCurrentPlanPaid, which only checks the plan's product_id against a hardcoded free-plan list. A trial has a non-free product_id, so it is misclassified as a fully paid plan and the plan step is dropped.

Even once the step is shown, it displayed the whole plan list. The eCommerce trial is created without a plan in the cart, so the site never gets a sell site_intent, and PlansFeaturesMain fell back to the default WPCOM grid. Keying off the current plan and returning the plans-business-trial intent scopes it to the commerce plans.

This mirrors the /plans/<site> page, which correctly detects the free trial and prompts the user to complete their purchase. isCurrentPlanPaid is left untouched (it is used widely).

Scope notes:

  • Only the eCommerce trial gets a scoped grid here; the other trial types (personal, migration, hosting, woo-hosted) are intentionally left untouched in this PR.
  • The trial-slug list is kept local rather than added to @automattic/calypso-products, per that package's AGENTS.md direction to treat it as frozen and not add new slug lists/predicates.

Testing Instructions

  1. Use a site on the eCommerce trial plan.
  2. Go to start/launch-site/launch?siteSlug=<trial-site> and click Launch.
  3. After domains-launch, confirm the flow now shows the plan-selection step (plans-launch), scoped to the commerce plans (Business + Commerce), instead of launching directly.
  4. Confirm a site on a regular paid plan still skips the plan step, and a free-plan site still shows it.
  5. yarn test-client client/lib/signup/test/step-actions.js passes.

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?
  • For UI changes, have you tested the affected components in dark mode?
  • Have you tested accessibility for your changes?
  • Have you used memoizing on expensive computations?
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
  • 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)?

🤖 Generated with Claude Code

A free-trial plan (e.g. the eCommerce trial) has a non-free product ID,
so isCurrentPlanPaid reports it as a paid plan and isPlanFulfilled
excluded the plans-launch step. Trial sites launching through
start/launch-site were therefore never offered the underlying plan to
purchase. Detect trial plans by slug and keep the plan step available.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

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

Sections (~237 bytes added 📈 [gzipped])

Details
Name Parsed Gzip
async-step-unified-plans +584 B +0.0% +124 B +0.0%
plans +168 B +0.0% +30 B +0.0%
jetpack-app +168 B +0.0% +44 B +0.0%
plugins +168 B +0.0% +39 B +0.0%
signup +55 B +0.0% +37 B +0.1%

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 (~19 bytes added 📈 [gzipped])

Details
Name Parsed Gzip
async-load-signup-steps-plans-theme-preselected +529 B +0.1% +87 B +0.0%
async-load-signup-steps-plans +529 B +0.1% +87 B +0.0%
async-load-calypso-blocks-jitm-templates-default -361 B -0.6% -24 B -0.1%
async-load-calypso-blocks-jitm-templates-sidebar-banner -361 B -0.6% -23 B -0.1%
async-load-calypso-blocks-jitm-templates-notice -361 B -0.6% -21 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.

An eCommerce free trial is created without a plan in the cart, so the
site never gets a `sell` site_intent and the plans grid falls back to
the full WPCOM set. Resolve the eCommerce-trial plan to the
`plans-business-trial` intent in the site-meta bridge so surfaces like
start/launch-site's plan step show the Business + Commerce plans.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
…anches

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@bogiii bogiii self-assigned this Sep 1, 2026
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@bogiii
bogiii requested a review from a team September 1, 2026 12:33
@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 Sep 1, 2026
@bogiii
bogiii marked this pull request as ready for review September 1, 2026 12:33
…anches

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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