diff --git a/client/landing/stepper/declarative-flow/site-setup-flow.ts b/client/landing/stepper/declarative-flow/site-setup-flow.ts index 1de834ca78abf..4106c42350c8b 100644 --- a/client/landing/stepper/declarative-flow/site-setup-flow.ts +++ b/client/landing/stepper/declarative-flow/site-setup-flow.ts @@ -491,7 +491,12 @@ const siteSetupFlow: Flow = { return navigate( `importerWordpress?${ urlQueryParams.toString() }` ); case 'difmStartingPoint': { - return exitFlow( `/start/website-design-services/?siteSlug=${ siteSlug }` ); + const backUrl = window.location.href.replace( window.location.origin, '' ); + return exitFlow( + `/start/website-design-services/?siteSlug=${ siteSlug }&back_to=${ encodeURIComponent( + backUrl + ) }` + ); } } } diff --git a/client/signup/config/flows-pure.js b/client/signup/config/flows-pure.js index e938bd44f2ce9..9b938574484e7 100644 --- a/client/signup/config/flows-pure.js +++ b/client/signup/config/flows-pure.js @@ -493,7 +493,8 @@ export function generateFlows( { destination: getDIFMSignupDestination, description: 'A flow for DIFM onboarding', excludeFromManageSiteFlows: true, - providesDependenciesInQuery: [ 'siteSlug' ], + providesDependenciesInQuery: [ 'siteSlug', 'back_to' ], + optionalDependenciesInQuery: [ 'back_to' ], lastModified: '2024-06-14', enablePresales: false, },