Skip to content

Commit

Permalink
Guided Onboarding: Redirect to newsletter flow if its the only option…
Browse files Browse the repository at this point in the history
… selected (#92002)
  • Loading branch information
agrullon95 committed Jun 20, 2024
1 parent 3a657d3 commit 0a9519c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion client/my-sites/plans/utils/get-segmented-intent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function getSegmentedIntent( answers: SurveyData ): SegmentedIntent {
return { segmentSlug: 'plans-guided-segment-nonprofit', segment: 'nonprofit' };
}

if ( surveyedGoals?.includes( 'newsletter' ) ) {
if ( surveyedGoals?.includes( 'newsletter' ) && surveyedGoals?.length === 1 ) {
return { segmentSlug: undefined, segment: 'newsletter' };
}

Expand Down
2 changes: 1 addition & 1 deletion client/signup/steps/initial-intent/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default function InitialIntentStep( props: Props ) {
redirect = '/start/do-it-for-me-store';
} else if ( _answerKeys.includes( 'difm' ) ) {
redirect = '/start/do-it-for-me';
} else if ( _answerKeys.includes( 'newsletter' ) ) {
} else if ( _answerKeys.includes( 'newsletter' ) && _answerKeys.length === 1 ) {
redirect = `/setup/${ NEWSLETTER_FLOW }/newsletterSetup`;
}

Expand Down

0 comments on commit 0a9519c

Please sign in to comment.