Skip to content

Fix: Only show domain-only thank you page for actual domain-only flows#109999

Open
bogiii wants to merge 2 commits intotrunkfrom
fix/domain-thank-you-page-regression
Open

Fix: Only show domain-only thank you page for actual domain-only flows#109999
bogiii wants to merge 2 commits intotrunkfrom
fix/domain-thank-you-page-regression

Conversation

@bogiii
Copy link
Copy Markdown
Contributor

@bogiii bogiii commented Apr 15, 2026

Fixes https://linear.app/a8c/issue/CHE-472/regression-post-checkout-thank-you-page-for-a-domain-purchased-on-an

Summary

Fixes a regression where domain purchases on existing sites were incorrectly showing the domain-only thank-you page with options like "Start a new site", "Add a mailbox", "Attach to an existing site", etc.

Problem

When a user purchases a domain for an existing site (e.g., from wordpress.com/domains/add/[site]), the thank-you page was displaying domain-only options instead of an appropriate page for adding a domain to an existing site.

Root Cause

Commit ac75c80c6a4 (Feb 19, 2026) removed a feature flag check that distinguished between:

  • Domain-only flows → show DomainOnly component with site creation options
  • Domain on existing site → show appropriate thank-you page

When the feature flag was removed, the code lost the ability to distinguish between these cases, causing ALL domain purchases to show the domain-only page.

The Fix

Added this.props.domainOnlySiteFlow check to the condition that renders the DomainOnly component:

} else if (
    this.props.receipt.data &&
    isOnlyDomainPurchases( purchases ) &&
    this.props.domainOnlySiteFlow  // ← NEW CHECK
) {

Now the domain-only thank-you page is only shown for actual domain-only flows, allowing other domain purchases to fall through to appropriate thank-you page components.

Test Plan

  1. Purchase a domain for an existing site (e.g., from wordpress.com/domains/add/[site])
  2. Verify the thank-you page does NOT show domain-only options
  3. Verify you are redirected to an appropriate thank-you page for domain purchases on existing sites
Before After
Screenshot 2026-04-15 at 13 27 24 Screenshot 2026-04-15 at 13 27 46

Add check for domainOnlySiteFlow prop to ensure the DomainOnly component is
only rendered for actual domain-only purchases, not for domain purchases on
existing sites.

This fixes a regression introduced in commit ac75c80 which removed the
feature flag check that previously distinguished between:
- Domain-only flows (needs special thank-you page with site creation options)
- Domain purchases on existing sites (needs appropriate page for adding domain)

When the feature flag was removed, the code lost the ability to distinguish
between these two cases, causing all domain purchases to show the domain-only
options page regardless of whether they were actually domain-only.
@bogiii bogiii requested a review from a team April 15, 2026 11:12
@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 Apr 15, 2026
@bogiii bogiii self-assigned this Apr 15, 2026
@matticbot
Copy link
Copy Markdown
Contributor

matticbot commented Apr 15, 2026

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

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

  • help-center

To test WordPress.com changes, run install-plugin.sh $pluginSlug fix/domain-thank-you-page-regression on your sandbox.

Ensures the DomainOnly page is only rendered when both isOnlyDomainPurchases
and domainOnlySiteFlow are true, preventing the page from incorrectly
appearing in non-domain-only flows.
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