diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/import/helper.ts b/client/landing/stepper/declarative-flow/internals/steps-repository/import/helper.ts index 6e39fa9530b4e..4896ffe8b253c 100644 --- a/client/landing/stepper/declarative-flow/internals/steps-repository/import/helper.ts +++ b/client/landing/stepper/declarative-flow/internals/steps-repository/import/helper.ts @@ -16,7 +16,7 @@ export function getFinalImporterUrl( fromSite: string, platform: ImporterPlatform, backToFlow?: string, - migrateEntireSiteFlow?: string + customizedActionGoToFlow?: string ) { let importerUrl; const encodedFromSite = encodeURIComponent( fromSite ); @@ -46,9 +46,9 @@ export function getFinalImporterUrl( } ); } - if ( migrateEntireSiteFlow ) { + if ( customizedActionGoToFlow ) { importerUrl = addQueryArgs( importerUrl, { - migrateEntireSiteFlow, + customizedActionGoToFlow, } ); } diff --git a/client/landing/stepper/declarative-flow/internals/steps-repository/importer-wordpress/index.tsx b/client/landing/stepper/declarative-flow/internals/steps-repository/importer-wordpress/index.tsx index 7b1b4d732161f..579b2e1a45402 100644 --- a/client/landing/stepper/declarative-flow/internals/steps-repository/importer-wordpress/index.tsx +++ b/client/landing/stepper/declarative-flow/internals/steps-repository/importer-wordpress/index.tsx @@ -34,18 +34,20 @@ const ImporterWordpress: FC< Props > = function ( props ) { ); let customizedActionButtons; - if ( queryParams.get( 'ref' ) === MIGRATION_FLOW ) { - customizedActionButtons = ( - { - props.navigation.submit?.( { action: 'customized-action-flow' } ); - } } - label={ translate( 'I want to migrate my entire site' ) } - cssClass={ clsx( 'step-container__navigation-link', 'forward', 'has-underline' ) } - borderless - /> - ); + switch ( queryParams.get( 'ref' ) ) { + case MIGRATION_FLOW: + customizedActionButtons = ( + { + props.navigation.submit?.( { action: 'customized-action-go-to-flow' } ); + } } + label={ translate( 'I want to migrate my entire site' ) } + cssClass={ clsx( 'step-container__navigation-link', 'forward', 'has-underline' ) } + borderless + /> + ); + break; } return ( diff --git a/client/landing/stepper/declarative-flow/migration/helpers/index.ts b/client/landing/stepper/declarative-flow/migration/helpers/index.ts index 6d2b46c5ede28..ad79c6db526e6 100644 --- a/client/landing/stepper/declarative-flow/migration/helpers/index.ts +++ b/client/landing/stepper/declarative-flow/migration/helpers/index.ts @@ -34,10 +34,10 @@ export const goToImporter = ( { replaceHistory = false, }: GoToImporterParams ) => { const backToFlow = backToStep ? getFlowPath( backToStep?.slug ) : undefined; - const migrateEntireSiteFlow = migrateEntireSiteStep + const customizedActionGoToFlow = migrateEntireSiteStep ? getFlowPath( migrateEntireSiteStep?.slug ) : undefined; - const path = getFinalImporterUrl( siteSlug, '', platform, backToFlow, migrateEntireSiteFlow ); + const path = getFinalImporterUrl( siteSlug, '', platform, backToFlow, customizedActionGoToFlow ); if ( isWpAdminImporter( path ) ) { return goTo( path, replaceHistory ); diff --git a/client/landing/stepper/declarative-flow/migration/test/index.tsx b/client/landing/stepper/declarative-flow/migration/test/index.tsx index c7ed0ceb95867..1b1c5ab7ff01f 100644 --- a/client/landing/stepper/declarative-flow/migration/test/index.tsx +++ b/client/landing/stepper/declarative-flow/migration/test/index.tsx @@ -306,7 +306,7 @@ describe( `${ flow.name }`, () => { from: '', option: 'content', backToFlow: '/migration/platform-identification', - migrateEntireSiteFlow: '/migration/migration-upgrade-plan', + customizedActionGoToFlow: '/migration/migration-upgrade-plan', siteId: 123, ref: 'migration', }, diff --git a/client/landing/stepper/declarative-flow/site-setup-flow.ts b/client/landing/stepper/declarative-flow/site-setup-flow.ts index 78502e7495d9a..4bc7370bc5ac2 100644 --- a/client/landing/stepper/declarative-flow/site-setup-flow.ts +++ b/client/landing/stepper/declarative-flow/site-setup-flow.ts @@ -452,10 +452,10 @@ const siteSetupFlow: Flow = { return navigate( `verifyEmail?${ urlQueryParams.toString() }` ); case 'checkout': return exitFlow( providedDependencies?.checkoutUrl as string ); - case 'customized-action-flow': { - const migrateEntireSiteFlow = urlQueryParams.get( 'migrateEntireSiteFlow' ); - if ( migrateEntireSiteFlow ) { - return goToFlow( migrateEntireSiteFlow ); + case 'customized-action-go-to-flow': { + const customizedActionGoToFlow = urlQueryParams.get( 'customizedActionGoToFlow' ); + if ( customizedActionGoToFlow ) { + return goToFlow( customizedActionGoToFlow ); } } default: