DIFM: redirect using siteId instead of siteSlug #100536
Open
+44
−26
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Related to #94517
Proposed Changes
/start/site-content-collection/website-content?siteId=<siteId>
instead of/start/site-content-collection/website-content?siteSlug=<siteSlug>
after checkout.Why are these changes being made?
The bug described in #94517 can be replicated by:
Adding the eCommerce plan to the cart (but not purchasing the product so that it stays in the cart) and then purchasing DIFM for the same site. Since the eCommerce plan is already in the cart, the user can purchase DIFM + eCommerce.
After purchase, the user is redirected to
/start/site-content-collection/website-content?siteSlug=<siteSlug>
wheresiteSlug
is the*.wordpress.com
subdomain.At the same time, atomic transfer happens and the site is switched to a
*.wpcomstaging.com
subdomain.In Calypso, we cannot fetch the correct site slug, so the endpoint sends a request with a

null
value for thesiteSlug
.If we redirect to
/start/site-content-collection/website-content?siteId=<siteId>
, this issue does not happen as thesiteId
is constant and available to use immediately.Testing Instructions
Pre-merge Checklist