Skip to content

MSD: correctly go back to previous steps when cancelling /setup/domain's checkout#109393

Merged
fushar merged 1 commit intotrunkfrom
msd-domain-back-checkout
Mar 20, 2026
Merged

MSD: correctly go back to previous steps when cancelling /setup/domain's checkout#109393
fushar merged 1 commit intotrunkfrom
msd-domain-back-checkout

Conversation

@fushar
Copy link
Contributor

@fushar fushar commented Mar 19, 2026

Part of DOTMSD-1126 -- fixing back button behavior

Proposed Changes

Pass and forward back_to param to all checkout URLs constructed by the domain flow (/setup/domain), so that canceling checkout will land to that back_to URL.

Testing Instructions

MSD - dotcom

  1. Click Dashboard (dotcom) Live link.
  2. Navigate to a site domains page (/sites/:siteSlug/domains).
  3. Click "Add domain name" → "Search domain names".
  4. Select a domain and proceed to plan selection and then checkout.
  5. Click the back/cancel button in checkout.
  6. Verify you land on /setup/domain.
  7. Click the back button in the top bar.
  8. Verify you return to the original site domains page.

MSD - CIAB

  1. Click Dashboard (CIAB) Live link.
  2. Navigate to a site domains page (/sites/:siteSlug/domains).
  3. Click "Add domain name" → "Search domain names".
  4. Select a domain and proceed to checkout.
  5. Click the back/cancel button in checkout.
  6. Verify you land on /setup/domain.
  7. Click the back button in the top bar.
  8. Verify you return to the original site domains page.

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?
  • Have you tested accessibility for your changes? Ensure the feature remains usable with various user agents (e.g., browsers), interfaces (e.g., keyboard navigation), and assistive technologies (e.g., screen readers) (PCYsg-S3g-p2).
  • Have you used memoizing on expensive computations? More info in Memoizing with create-selector and Using memoizing selectors and Our Approach to Data
  • Have we added the "[Status] String Freeze" label as soon as any new strings were ready for translation (p4TIVU-5Jq-p2)?
    • For UI changes, have we tested the change in various languages (for example, ES, PT, FR, or DE)? The length of text and words vary significantly between languages.
  • 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)?

@matticbot
Copy link
Contributor

matticbot commented Mar 19, 2026

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

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

  • blaze-dashboard
  • help-center
  • odyssey-stats

To test WordPress.com changes, run install-plugin.sh $pluginSlug msd-domain-back-checkout on your sandbox.

@fushar fushar changed the title MSD: correctly go back to previous steps when cancelling /setup/domain's checkout MSD (CIAB): correctly go back to previous steps when cancelling /setup/domain's checkout Mar 19, 2026
@fushar fushar force-pushed the msd-domain-back-checkout branch from 9738704 to 73d5ba4 Compare March 19, 2026 16:35
@fushar fushar changed the title MSD (CIAB): correctly go back to previous steps when cancelling /setup/domain's checkout MSD: correctly go back to previous steps when cancelling /setup/domain's checkout Mar 19, 2026
@fushar fushar self-assigned this Mar 19, 2026
@fushar fushar requested a review from WPprodigy March 19, 2026 16:43
@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 Mar 19, 2026
@fushar fushar requested a review from a team March 19, 2026 16:43
@fushar fushar marked this pull request as ready for review March 19, 2026 16:43
@fushar fushar requested a review from a team as a code owner March 19, 2026 16:43
@fushar fushar requested a review from zaguiini March 19, 2026 16:45
@StevenDufresne
Copy link
Contributor

I end up back in the cart with a free site:

Screen.Recording.on.2026-03-20.at.09-23-38.mp4

@fushar
Copy link
Contributor Author

fushar commented Mar 20, 2026

Ohhh it's because from MSD-dotcom, links to stepper screens still go to [wpcalypso.]wordpress.com (as shown in your screenshot) 🙈 (p1773958869364639/1773786780.552529-slack-CRWCHQGUB)

To test on dotcom, you need to test locally, or manually replace wpcalypso.wordpress.com with the container hostname manually.

Copy link
Contributor

@StevenDufresne StevenDufresne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Working. 👍

@fushar fushar merged commit bc93ce2 into trunk Mar 20, 2026
16 of 17 checks passed
@fushar fushar deleted the msd-domain-back-checkout branch March 20, 2026 07:14
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Mar 20, 2026
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.

3 participants