Skip to content

Plugins "Get started": fix blank page + duplicate site when backing out of checkout - #112462

Merged
taipeicoder merged 3 commits into
trunkfrom
fix/with-plugin-checkout-back-domains-skip
Jul 9, 2026
Merged

Plugins "Get started": fix blank page + duplicate site when backing out of checkout#112462
taipeicoder merged 3 commits into
trunkfrom
fix/with-plugin-checkout-back-domains-skip

Conversation

@taipeicoder

Copy link
Copy Markdown
Contributor

Proposed Changes

Fix backing out of checkout in the per-plugin "Get started" (with-plugin) flow, which had two separate failures:

  • Blank page. The checkout back URL dropped the required billing_period query dependency for free plugins (which have no billing period), so the flow controller rejected the URL and the plans step rendered blank. It now always includes billing_period (empty for free plugins).
  • Duplicate site. Re-entering the flow restarted at the domains step and created a second site. The framework already has a "skip the domains step on browser-back from checkout" path for the onboarding flow (persist domains data on completion, re-submit it on re-entry so the site is reused). This extends that path to the with-plugin flow.

Net result: backing out of checkout lands on the plans grid with the plugin selected — no blank page, no duplicate site.

Testing Instructions

  1. Log out, open a free marketplace plugin (e.g. MailPoet) and a paid one (e.g. Sensei Pro), "Get started".
  2. Create an account, pick a domain, land on the plans grid, pick a plan → checkout.
  3. Click the checkout back control.
  4. Confirm you return to the plans grid (not blank, not the domains step) and that no duplicate site was created.

Unit tests in client/signup/test/flows.js cover the back URL carrying billing_period for both paid and free plugins. The domains-skip behavior was verified manually for both plugin types.

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)?
  • 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)?

…e or duplicate site

Backing out of checkout in the with-plugin flow had two problems:
- The back URL dropped the required billing_period query dependency for free
  plugins, so the flow controller threw and the plans step rendered blank.
  Always include billing_period (empty for free plugins).
- Re-entering the flow restarted at the domains step and created a duplicate
  site. Extend the existing onboarding "skip domains on browser-back" path
  (persist domains data on completion, re-submit it on re-entry) to the
  with-plugin flow, so it reuses the created site and lands on the plans grid.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ow flag

Replace the duplicated [ 'onboarding', 'with-plugin' ] flow-name list in
controller.js and main.jsx with a persistsDomainsOnReEntry flag on the flow
config, mirroring the existing excludeFromManageSiteFlows pattern. A flow now
opts into the domains-persist/skip-on-browser-back behavior in one place
instead of two lists that must stay in sync.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@taipeicoder taipeicoder self-assigned this Jul 9, 2026
…field

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@taipeicoder
taipeicoder marked this pull request as ready for review July 9, 2026 09:26
@taipeicoder
taipeicoder added this pull request to the merge queue Jul 9, 2026
Merged via the queue into trunk with commit f5d7600 Jul 9, 2026
10 checks passed
@taipeicoder
taipeicoder deleted the fix/with-plugin-checkout-back-domains-skip branch July 9, 2026 09:38
@matticbot

matticbot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

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

Sections (~46 bytes added 📈 [gzipped])

Details
name                      parsed_size           gzip_size
signup                         +117 B  (+0.0%)      +46 B  (+0.1%)
async-step-unified-plans        +60 B  (+0.0%)      +20 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.

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.

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.

2 participants