Remove WooCommerce Tax copies if it is already installed (https://github.com/woocommerce/woocommerce-admin/pull/5726)
This commit is contained in:
parent
8fec9af1ad
commit
dcff488152
|
@ -192,6 +192,24 @@ class Tax extends Component {
|
||||||
updateOptions,
|
updateOptions,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const { cachedPluginsToActivate } = this.state;
|
const { cachedPluginsToActivate } = this.state;
|
||||||
|
let step2Label, agreementText;
|
||||||
|
|
||||||
|
if ( cachedPluginsToActivate.includes( 'woocommerce-services' ) ) {
|
||||||
|
step2Label = __(
|
||||||
|
'Install Jetpack and WooCommerce Tax',
|
||||||
|
'woocommerce-admin'
|
||||||
|
);
|
||||||
|
agreementText = __(
|
||||||
|
'By installing Jetpack and WooCommerce Tax you agree to the {{link}}Terms of Service{{/link}}.',
|
||||||
|
'woocommerce-admin'
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
step2Label = __( 'Install Jetpack', 'woocommerce-admin' );
|
||||||
|
agreementText = __(
|
||||||
|
'By installing Jetpack you agree to the {{link}}Terms of Service{{/link}}.',
|
||||||
|
'woocommerce-admin'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
const steps = [
|
const steps = [
|
||||||
{
|
{
|
||||||
|
@ -221,10 +239,7 @@ class Tax extends Component {
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: 'plugins',
|
key: 'plugins',
|
||||||
label: __(
|
label: step2Label,
|
||||||
'Install Jetpack and WooCommerce Tax',
|
|
||||||
'woocommerce-admin'
|
|
||||||
),
|
|
||||||
description: __(
|
description: __(
|
||||||
'Jetpack and WooCommerce Tax allow you to automate sales tax calculations',
|
'Jetpack and WooCommerce Tax allow you to automate sales tax calculations',
|
||||||
'woocommerce-admin'
|
'woocommerce-admin'
|
||||||
|
@ -273,10 +288,7 @@ class Tax extends Component {
|
||||||
className="woocommerce-task__caption"
|
className="woocommerce-task__caption"
|
||||||
>
|
>
|
||||||
{ interpolateComponents( {
|
{ interpolateComponents( {
|
||||||
mixedString: __(
|
mixedString: agreementText,
|
||||||
'By installing Jetpack and WooCommerce Tax you agree to the {{link}}Terms of Service{{/link}}.',
|
|
||||||
'woocommerce-admin'
|
|
||||||
),
|
|
||||||
components: {
|
components: {
|
||||||
link: (
|
link: (
|
||||||
<Link
|
<Link
|
||||||
|
|
Loading…
Reference in New Issue