diff --git a/plugins/woocommerce-admin/client/dashboard/profile-wizard/header-logo.js b/plugins/woocommerce-admin/client/dashboard/profile-wizard/header-logo.js deleted file mode 100644 index d5fba57eb54..00000000000 --- a/plugins/woocommerce-admin/client/dashboard/profile-wizard/header-logo.js +++ /dev/null @@ -1,144 +0,0 @@ -/** - * External dependencies - */ -import { __ } from '@wordpress/i18n'; -import { Component } from '@wordpress/element'; -import { compose } from '@wordpress/compose'; -import classNames from 'classnames'; - -/** - * Internal dependencies - */ -import withSelect from 'wc-api/with-select'; - -class HeaderLogo extends Component { - render() { - const { isJetpackConnected } = this.props; - - const ariaLabel = ! isJetpackConnected - ? __( 'Jetpack + WooCommerce', 'woocommerce-admin' ) - : __( 'WooCommerce', 'woocommerce-admin' ); - const classes = classNames( 'woocommerce-profile-wizard__header-logo', { - 'woocommerce-profile-wizard__header-logo-with-jetpack': ! isJetpackConnected, - } ); - - return ( - - ); - } -} - -export default compose( - withSelect( ( select ) => { - const { isJetpackConnected } = select( 'wc-api' ); - return { - isJetpackConnected: isJetpackConnected(), - }; - } ) -)( HeaderLogo ); diff --git a/plugins/woocommerce-admin/client/dashboard/profile-wizard/header.js b/plugins/woocommerce-admin/client/dashboard/profile-wizard/header.js index d1e974f3f9d..e0d2cee6eb0 100644 --- a/plugins/woocommerce-admin/client/dashboard/profile-wizard/header.js +++ b/plugins/woocommerce-admin/client/dashboard/profile-wizard/header.js @@ -3,7 +3,6 @@ */ import { Component } from '@wordpress/element'; import { filter } from 'lodash'; -import classnames from 'classnames'; /** * WooCommerce dependencies @@ -14,7 +13,6 @@ import { updateQueryString } from '@woocommerce/navigation'; * Internal dependencies */ import { Stepper } from '@woocommerce/components'; -import HeaderLogo from './header-logo'; export default class ProfileWizardHeader extends Component { renderStepper() { @@ -44,13 +42,14 @@ export default class ProfileWizardHeader extends Component { const currentStep = this.props.steps.find( ( s ) => s.key === this.props.currentStep ); - const showStepper = ! currentStep || ! currentStep.label ? false : true; - const classes = classnames( 'woocommerce-profile-wizard__header', { - 'is-stepper': showStepper, - } ); + + if ( ! currentStep || ! currentStep.label ) { + return null; + } + return ( -
{ description }
@@ -114,38 +115,11 @@ class Benefits extends Component { } getBenefits() { - const { isJetpackActive, isWcsActive, tosAccepted } = this.props; + const { isJetpackActive, isWcsActive } = this.props; return [ { - title: __( 'Security', 'woocommerce-admin' ), - icon:- { interpolateComponents( { - mixedString: sprintf( - __( - 'Simplify and enhance the setup of your store with the free features and benefits offered by {{strong}}%s{{/strong}}.', - 'woocommerce-admin' - ), - pluginNamesString - ), - components: { - strong: , - }, - } ) } -
- -- { interpolateComponents( { - mixedString: __( - 'By connecting your site you agree to our fascinating {{tosLink}}Terms of Service{{/tosLink}} and to ' + - '{{detailsLink}}share details{{/detailsLink}} with WordPress.com. ', - 'woocommerce-admin' - ), - components: { - tosLink: ( - - ), - detailsLink: ( - - ), - }, - } ) } -
+ { this.renderBenefits() } +- -
- ) } -+ { sprintf( + __( + '%s %s will be installed & activated for free.', + 'woocommerce-admin' + ), + pluginNamesString, + _n( + 'plugin', + 'plugins', + pluginsToInstall.length, + 'woocommerce-admin' + ) + ) } +
+ ); } } @@ -290,20 +241,11 @@ export default compose( const { getProfileItemsError, getActivePlugins, - getOptions, getProfileItems, isGetProfileItemsRequesting, } = select( 'wc-api' ); const isProfileItemsError = Boolean( getProfileItemsError() ); - - const options = getOptions( [ - 'woocommerce_setup_jetpack_opted_in', - 'wc_connect_options', - ] ); - const tosAccepted = get( options, [ 'wc_connect_options' ], {} ) - .tos_accepted; - const activePlugins = getActivePlugins(); const profileItems = getProfileItems(); const isJetpackActive = activePlugins.includes( 'jetpack' ); @@ -313,7 +255,6 @@ export default compose( isJetpackActive, isProfileItemsError, isWcsActive, - tosAccepted, profileItems, isRequesting: isGetProfileItemsRequesting(), }; diff --git a/plugins/woocommerce-admin/client/dashboard/profile-wizard/steps/benefits/logo.js b/plugins/woocommerce-admin/client/dashboard/profile-wizard/steps/benefits/logo.js new file mode 100644 index 00000000000..d5c3817e306 --- /dev/null +++ b/plugins/woocommerce-admin/client/dashboard/profile-wizard/steps/benefits/logo.js @@ -0,0 +1,71 @@ +/** + * External dependencies + */ +import { __ } from '@wordpress/i18n'; +import { Component } from '@wordpress/element'; + +class Logo extends Component { + render() { + return ( +