Add copy that WCS TOS will be accepted upon install. (https://github.com/woocommerce/woocommerce-admin/pull/4799)
* Add copy that WCS TOS will be accepted upon install. * Remove unused getAdminLink import. Co-authored-by: Timmy Crawford <timmydcrawford@gmail.com>
This commit is contained in:
parent
a82d359a5e
commit
795c6ca585
|
@ -7,11 +7,12 @@ import { Component } from '@wordpress/element';
|
||||||
import { compose } from '@wordpress/compose';
|
import { compose } from '@wordpress/compose';
|
||||||
import { withDispatch, withSelect } from '@wordpress/data';
|
import { withDispatch, withSelect } from '@wordpress/data';
|
||||||
import { filter } from 'lodash';
|
import { filter } from 'lodash';
|
||||||
|
import interpolateComponents from 'interpolate-components';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* WooCommerce dependencies
|
* WooCommerce dependencies
|
||||||
*/
|
*/
|
||||||
import { Card, H } from '@woocommerce/components';
|
import { Card, H, Link } from '@woocommerce/components';
|
||||||
import {
|
import {
|
||||||
pluginNames,
|
pluginNames,
|
||||||
ONBOARDING_STORE_NAME,
|
ONBOARDING_STORE_NAME,
|
||||||
|
@ -212,6 +213,13 @@ class Benefits extends Component {
|
||||||
);
|
);
|
||||||
const isInstallAction =
|
const isInstallAction =
|
||||||
isInstallingActivating || ! pluginsRemaining.length;
|
isInstallingActivating || ! pluginsRemaining.length;
|
||||||
|
const isAcceptingTos = ! this.isWcsActive;
|
||||||
|
const pluralizedPlugins = _n(
|
||||||
|
'plugin',
|
||||||
|
'plugins',
|
||||||
|
this.pluginsToInstall.length,
|
||||||
|
'woocommerce-admin'
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="woocommerce-profile-wizard__benefits-card">
|
<Card className="woocommerce-profile-wizard__benefits-card">
|
||||||
|
@ -246,19 +254,34 @@ class Benefits extends Component {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<p className="woocommerce-profile-wizard__benefits-install-notice">
|
<p className="woocommerce-profile-wizard__benefits-install-notice">
|
||||||
{ sprintf(
|
{ isAcceptingTos
|
||||||
__(
|
? interpolateComponents( {
|
||||||
'%s %s will be installed & activated for free.',
|
mixedString: sprintf(
|
||||||
'woocommerce-admin'
|
__(
|
||||||
),
|
'%s %s will be installed & activated for free, and you agree to our {{link}}Terms of Service{{/link}}.',
|
||||||
pluginNamesString,
|
'woocommerce-admin'
|
||||||
_n(
|
),
|
||||||
'plugin',
|
pluginNamesString,
|
||||||
'plugins',
|
pluralizedPlugins
|
||||||
this.pluginsToInstall.length,
|
),
|
||||||
'woocommerce-admin'
|
components: {
|
||||||
)
|
link: (
|
||||||
) }
|
<Link
|
||||||
|
href="https://wordpress.com/tos/"
|
||||||
|
target="_blank"
|
||||||
|
type="external"
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
},
|
||||||
|
} )
|
||||||
|
: sprintf(
|
||||||
|
__(
|
||||||
|
'%s %s will be installed & activated for free.',
|
||||||
|
'woocommerce-admin'
|
||||||
|
),
|
||||||
|
pluginNamesString,
|
||||||
|
pluralizedPlugins
|
||||||
|
) }
|
||||||
</p>
|
</p>
|
||||||
</Card>
|
</Card>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue