Remove WooCommerce step from setup wizard
[MAILPOET-2619]
This commit is contained in:
committed by
Jack Kitterhing
parent
b0760aeeea
commit
01b498f549
@@ -1,43 +0,0 @@
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import MailPoet from 'mailpoet';
|
||||
|
||||
const WelcomeWizardWooCommerceStep = (props) => (
|
||||
<div className="mailpoet_welcome_wizard_step_content">
|
||||
<h1>{MailPoet.I18n.t('welcomeWizardWooCommerceStepTitle')}</h1>
|
||||
<p>
|
||||
{MailPoet.I18n.t('welcomeWizardHelpingShopOwnersText')}
|
||||
</p>
|
||||
<p>
|
||||
{MailPoet.I18n.t('welcomeWizardWooCommerceEmailsText')}
|
||||
</p>
|
||||
<img
|
||||
src={props.screenshot_src}
|
||||
className="mailpoet_welcome_wizard_woo_screenshot"
|
||||
alt="WooCommerce email"
|
||||
/>
|
||||
<div
|
||||
className={
|
||||
`mailpoet_welcome_wizard_step_controls
|
||||
${(props.loading ? 'mailpoet_welcome_wizard_step_controls_loading' : '')}`
|
||||
}
|
||||
>
|
||||
<button
|
||||
type="button"
|
||||
className="button button-primary"
|
||||
onClick={props.next}
|
||||
disabled={props.loading}
|
||||
>
|
||||
{MailPoet.I18n.t('gotIt')}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
WelcomeWizardWooCommerceStep.propTypes = {
|
||||
next: PropTypes.func.isRequired,
|
||||
screenshot_src: PropTypes.string.isRequired,
|
||||
loading: PropTypes.bool.isRequired,
|
||||
};
|
||||
|
||||
export default WelcomeWizardWooCommerceStep;
|
@@ -1,8 +1,5 @@
|
||||
export const getStepsCount = () => {
|
||||
let stepsCount = 3;
|
||||
if (window.is_woocommerce_active) {
|
||||
stepsCount += 1;
|
||||
}
|
||||
if (!window.has_mss_key_specified) {
|
||||
stepsCount += 1;
|
||||
}
|
||||
@@ -20,7 +17,6 @@ export const redirectToNextStep = (history, finishWizard, currentStep) => {
|
||||
|
||||
export const mapStepNumberToStepName = (stepNumber) => {
|
||||
const shouldSetSender = !window.is_mp2_migration_complete;
|
||||
const isWoocommerceActive = window.is_woocommerce_active;
|
||||
if (stepNumber === 1 && shouldSetSender) {
|
||||
return 'WelcomeWizardSenderStep';
|
||||
}
|
||||
@@ -33,8 +29,5 @@ export const mapStepNumberToStepName = (stepNumber) => {
|
||||
if (stepNumber === 3) {
|
||||
return 'WelcomeWizardUsageTrackingStep';
|
||||
}
|
||||
if (stepNumber === 4 && isWoocommerceActive) {
|
||||
return 'WelcomeWizardWooCommerceStep';
|
||||
}
|
||||
return 'WelcomeWizardPitchMSSStep';
|
||||
};
|
||||
|
@@ -6,7 +6,6 @@ import WelcomeWizardSenderStep from './steps/sender_step.jsx';
|
||||
import WelcomeWizardMigratedUserStep from './steps/migrated_user_step.jsx';
|
||||
import WelcomeWizardEmailCourseStep from './steps/email_course_step.jsx';
|
||||
import WelcomeWizardUsageTrackingStep from './steps/usage_tracking_step.jsx';
|
||||
import WelcomeWizardWooCommerceStep from './steps/woo_commerce_step.jsx';
|
||||
import WelcomeWizardPitchMSSStep from './steps/pitch_mss_step.jsx';
|
||||
import WelcomeWizardStepLayout from './layout/step_layout.jsx';
|
||||
|
||||
@@ -135,21 +134,6 @@ const WelcomeWizardStepsController = (props) => {
|
||||
</WelcomeWizardStepLayout>
|
||||
) : null}
|
||||
|
||||
{ stepName === 'WelcomeWizardWooCommerceStep'
|
||||
? (
|
||||
<WelcomeWizardStepLayout
|
||||
step={step}
|
||||
stepsCount={stepsCount}
|
||||
illustrationUrl={window.wizard_woocommerce_illustration_url}
|
||||
>
|
||||
<WelcomeWizardWooCommerceStep
|
||||
next={() => redirect(step)}
|
||||
screenshot_src={window.wizard_woocommerce_box_url}
|
||||
loading={loading}
|
||||
/>
|
||||
</WelcomeWizardStepLayout>
|
||||
) : null}
|
||||
|
||||
{ stepName === 'WelcomeWizardPitchMSSStep'
|
||||
? (
|
||||
<WelcomeWizardStepLayout
|
||||
|
Reference in New Issue
Block a user