Entrepreneur Signup: Simplify final step in CYS when entering from Entrepreneur signup flow. (#47578)

* Simplify final step in CYS when entering from Entrepreneur Signup.

* Add changelog.

* Update plugins/woocommerce-admin/client/customize-store/transitional/index.tsx

Co-authored-by: Ivan Ottinger <ivan.ottinger@automattic.com>

* Show My Home button as primary button only on Entrepreneur flow.

* Use 	'customize_your_store_entrepreneur_home_click' tracks event instead.

---------

Co-authored-by: Ivan Ottinger <ivan.ottinger@automattic.com>
This commit is contained in:
Yan Sern 2024-05-21 21:56:26 +08:00 committed by GitHub
parent 2b69d28ecb
commit 9a1f987381
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 158 additions and 113 deletions

View File

@ -27,6 +27,7 @@ import { SurveyForm } from './survey-form';
import lessonPlan from '../assets/icons/lesson-plan.js';
import { Icon, brush, tag } from '@wordpress/icons';
import { trackEvent } from '../tracking';
import { isEntrepreneurFlow } from '~/customize-store/design-with-ai/entrepreneur-flow';
export * as actions from './actions';
export * as services from './services';
@ -53,7 +54,7 @@ export const Transitional = ( {
setSurveyOpen( false );
};
const showSurveyButton = ! hasCompleteSurvey;
const showSurveyButton = ! hasCompleteSurvey && ! isEntrepreneurFlow();
const showAISurvey = isWooExpress && aiOnline;
return (
@ -90,7 +91,12 @@ export const Transitional = ( {
{ __( 'Your store looks great!', 'woocommerce' ) }
</h1>
<h2 className="woocommerce-customize-store__transitional-subheading">
{ __(
{ isEntrepreneurFlow()
? __(
"Congratuations! You've successfully designed your store. Now you can go back to the Home screen to complete your store setup and start selling.",
'woocommerce'
)
: __(
"Congratulations! You've successfully designed your store. Take a look at your hard work before continuing to set up your store.",
'woocommerce'
) }
@ -117,7 +123,9 @@ export const Transitional = ( {
<Button
className="woocommerce-customize-store__transitional-preview-button"
variant="primary"
variant={
isEntrepreneurFlow() ? 'secondary' : 'primary'
}
onClick={ () => {
trackEvent(
'customize_your_store_transitional_preview_store_click'
@ -127,7 +135,25 @@ export const Transitional = ( {
>
{ __( 'View store', 'woocommerce' ) }
</Button>
{ isEntrepreneurFlow() && (
<Button
variant="primary"
onClick={ () => {
trackEvent(
'customize_your_store_entrepreneur_home_click'
);
sendEvent( {
type: 'GO_BACK_TO_HOME',
} );
} }
>
{ __( 'Back to Home', 'woocommerce' ) }
</Button>
) }
</div>
{ ! isEntrepreneurFlow() && (
<>
<h2 className="woocommerce-customize-store__transitional-main-actions-title">
{ __( "What's next?", 'woocommerce' ) }
</h2>
@ -141,7 +167,10 @@ export const Transitional = ( {
/>
<div className="woocommerce-customize-store__transitional-action__content">
<h3>
{ __( 'Add your products', 'woocommerce' ) }
{ __(
'Add your products',
'woocommerce'
) }
</h3>
<p>
{ __(
@ -161,7 +190,10 @@ export const Transitional = ( {
);
} }
>
{ __( 'Go to Products', 'woocommerce' ) }
{ __(
'Go to Products',
'woocommerce'
) }
</Button>
</div>
</div>
@ -175,7 +207,10 @@ export const Transitional = ( {
/>
<div className="woocommerce-customize-store__transitional-action__content">
<h3>
{ __( 'Fine-tune your design', 'woocommerce' ) }
{ __(
'Fine-tune your design',
'woocommerce'
) }
</h3>
<p>
{ __(
@ -195,7 +230,10 @@ export const Transitional = ( {
);
} }
>
{ __( 'Go to the Editor', 'woocommerce' ) }
{ __(
'Go to the Editor',
'woocommerce'
) }
</Button>
</div>
</div>
@ -236,6 +274,8 @@ export const Transitional = ( {
</div>
</div>
</div>
</>
) }
</div>
</div>
);

View File

@ -0,0 +1,5 @@
Significance: patch
Type: update
Comment: Simplify final step in CYS when entering from Entrepreneur signup flow.