Skip to content

Commit

Permalink
Keep wp-for-teams flow for clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
lamosty committed Jun 5, 2020
1 parent 714f053 commit 85bdbe9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/lib/signup/step-actions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ export function createAccount(
},
reduxStore
) {
// See client/signup/config/flows-pure.js p2 flow for more info.
if ( flowName === 'p2' ) {
flowName = 'wp-for-teams';
}
Expand Down
8 changes: 7 additions & 1 deletion client/signup/config/flows-pure.js
Original file line number Diff line number Diff line change
Expand Up @@ -250,12 +250,18 @@ export function generateFlows( {
}

if ( isEnabled( 'signup/wpforteams' ) ) {
flows.p2 = {
flows[ 'wp-for-teams' ] = {
steps: [ 'p2-site', 'user' ],
destination: ( dependencies ) => `https://${ dependencies.siteSlug }`,
description: 'P2 signup flow',
lastModified: '2020-06-04',
};

// Original name for the project was "WP for Teams". Since then, we've renamed it to "P2".
// However, backend and Marketing is expecting `wp-for-teams` as the `signup_flow_name` var
// so we force it in client/lib/signup/step-actions/index.js `createAccount` function.
// Keeping both flows for clarity.
flows.p2 = { ...flows[ 'wp-for-teams' ] };
}

flows.domain = {
Expand Down

0 comments on commit 85bdbe9

Please sign in to comment.