Commit 338cf78d55e for woocommerce
commit 338cf78d55e5f777b81f6ce66bad91d6dbd1c716
Author: Akeda Bagus <akeda.bagus@automattic.com>
Date: Wed Nov 11 20:28:01 2026 +0700
Point Terms of Service links to automattic.com/tos (#70802)
* Point Terms of Service links to automattic.com/tos
The Terms of Service moved from wordpress.com/tos to automattic.com/tos. Update admin links, and point WooPay merchant terms links at the #woopay section.
* Fix lint errors in Terms of Service link files
Swap ExternalLink for the @wordpress/ui Link in the shipping label banner, add the missing translator placeholder description, and drop unused catch bindings. Remove the suppression entry that is no longer needed.
* Link WooPay merchant terms to the ecommerce services section
The merchant terms paragraph lives under #ecommerce-services; #woopay is the shopper-side section. Also drop redundant rel attributes from the shipping banner links.
---------
Co-authored-by: Herman <KokkieH@users.noreply.github.com>
diff --git a/plugins/woocommerce/changelog/fix-tos-links-automattic b/plugins/woocommerce/changelog/fix-tos-links-automattic
new file mode 100644
index 00000000000..045d4568a2d
--- /dev/null
+++ b/plugins/woocommerce/changelog/fix-tos-links-automattic
@@ -0,0 +1,4 @@
+Significance: patch
+Type: tweak
+
+Point Terms of Service links in WooCommerce admin to automattic.com/tos instead of wordpress.com/tos.
diff --git a/plugins/woocommerce/client/admin/client/core-profiler/pages/Plugins/components/plugin-terms-of-service/PluginsTermsOfService.tsx b/plugins/woocommerce/client/admin/client/core-profiler/pages/Plugins/components/plugin-terms-of-service/PluginsTermsOfService.tsx
index 2f5e2bfafd4..9d685816fc4 100644
--- a/plugins/woocommerce/client/admin/client/core-profiler/pages/Plugins/components/plugin-terms-of-service/PluginsTermsOfService.tsx
+++ b/plugins/woocommerce/client/admin/client/core-profiler/pages/Plugins/components/plugin-terms-of-service/PluginsTermsOfService.tsx
@@ -50,7 +50,7 @@ export const PluginsTermsOfService = ( {
span: <span />,
link: (
<Link
- href="https://wordpress.com/tos/"
+ href="https://automattic.com/tos/"
target="_blank"
type="external"
/>
diff --git a/plugins/woocommerce/client/admin/client/core-profiler/pages/Plugins/components/plugin-terms-of-service/test/__snapshots__/index.tsx.snap b/plugins/woocommerce/client/admin/client/core-profiler/pages/Plugins/components/plugin-terms-of-service/test/__snapshots__/index.tsx.snap
index d1d0f4a6a9e..20bdd4e4e3a 100644
--- a/plugins/woocommerce/client/admin/client/core-profiler/pages/Plugins/components/plugin-terms-of-service/test/__snapshots__/index.tsx.snap
+++ b/plugins/woocommerce/client/admin/client/core-profiler/pages/Plugins/components/plugin-terms-of-service/test/__snapshots__/index.tsx.snap
@@ -11,7 +11,7 @@ exports[`PluginsTermsOfService should render TOS message when Jetpack is selecte
plugin for free you agree to our
<a
data-link-type="external"
- href="https://wordpress.com/tos/"
+ href="https://automattic.com/tos/"
target="_blank"
>
Terms of Service
@@ -39,7 +39,7 @@ exports[`PluginsTermsOfService should render TOS message with multiple plugins w
plugins for free you agree to our
<a
data-link-type="external"
- href="https://wordpress.com/tos/"
+ href="https://automattic.com/tos/"
target="_blank"
>
Terms of Service
@@ -67,7 +67,7 @@ exports[`PluginsTermsOfService should render TOS message with multiple plugins w
plugins for free you agree to our
<a
data-link-type="external"
- href="https://wordpress.com/tos/"
+ href="https://automattic.com/tos/"
target="_blank"
>
Terms of Service
diff --git a/plugins/woocommerce/client/admin/client/payments-welcome/strings.tsx b/plugins/woocommerce/client/admin/client/payments-welcome/strings.tsx
index 3ffbde954e4..cce3833c295 100644
--- a/plugins/woocommerce/client/admin/client/payments-welcome/strings.tsx
+++ b/plugins/woocommerce/client/admin/client/payments-welcome/strings.tsx
@@ -29,7 +29,7 @@ export default {
a1: (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a
- href="https://wordpress.com/tos"
+ href="https://automattic.com/tos/"
target="_blank"
rel="noopener noreferrer"
/>
@@ -57,7 +57,7 @@ export default {
a1: (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a
- href="https://wordpress.com/tos"
+ href="https://automattic.com/tos/"
target="_blank"
rel="noopener noreferrer"
/>
@@ -73,7 +73,7 @@ export default {
a3: (
// eslint-disable-next-line jsx-a11y/anchor-has-content
<a
- href="https://wordpress.com/tos/#more-woopay-specifically"
+ href="https://automattic.com/tos/#ecommerce-services"
target="_blank"
rel="noopener noreferrer"
/>
diff --git a/plugins/woocommerce/client/admin/client/settings-payments/onboarding/providers/woopayments/steps/business-verification/strings.tsx b/plugins/woocommerce/client/admin/client/settings-payments/onboarding/providers/woopayments/steps/business-verification/strings.tsx
index 16848625ba1..baf9eb3fd46 100644
--- a/plugins/woocommerce/client/admin/client/settings-payments/onboarding/providers/woopayments/steps/business-verification/strings.tsx
+++ b/plugins/woocommerce/client/admin/client/settings-payments/onboarding/providers/woopayments/steps/business-verification/strings.tsx
@@ -6,10 +6,10 @@ import interpolateComponents from '@automattic/interpolate-components';
import React from 'react';
const documentationUrls = {
- tos: 'https://wordpress.com/tos/',
+ tos: 'https://automattic.com/tos/',
signUpLink:
'https://woocommerce.com/document/woopayments/startup-guide/#sign-up-process',
- merchantTerms: 'https://wordpress.com/tos/#more-woopay-specifically',
+ merchantTerms: 'https://automattic.com/tos/#ecommerce-services',
privacyPolicy: 'https://automattic.com/privacy/',
};
diff --git a/plugins/woocommerce/client/admin/client/task-lists/components/terms-of-service.js b/plugins/woocommerce/client/admin/client/task-lists/components/terms-of-service.js
index 095d2779b0c..c139ed1e088 100644
--- a/plugins/woocommerce/client/admin/client/task-lists/components/terms-of-service.js
+++ b/plugins/woocommerce/client/admin/client/task-lists/components/terms-of-service.js
@@ -16,7 +16,7 @@ export const TermsOfService = ( { buttonText } ) => (
>
{ interpolateComponents( {
mixedString: sprintf(
- /* translators: button text, most likely something like 'Install and Enable' or Continue setup' */
+ /* translators: %s: button text, most likely something like 'Install and Enable' or 'Continue setup' */
__(
'By clicking "%s," you agree to our {{tosLink}}Terms of Service{{/tosLink}} and have read our {{privacyPolicyLink}}Privacy Policy{{/privacyPolicyLink}}.',
'woocommerce'
@@ -26,7 +26,7 @@ export const TermsOfService = ( { buttonText } ) => (
components: {
tosLink: (
<Link
- href={ 'https://wordpress.com/tos/' }
+ href={ 'https://automattic.com/tos/' }
target="_blank"
type="external"
>
diff --git a/plugins/woocommerce/client/admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/index.js b/plugins/woocommerce/client/admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/index.js
index 3631ab951d4..2fa83dc2caa 100644
--- a/plugins/woocommerce/client/admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/index.js
+++ b/plugins/woocommerce/client/admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/index.js
@@ -3,7 +3,8 @@
*/
import { __, sprintf } from '@wordpress/i18n';
import { Component } from '@wordpress/element';
-import { Button, ExternalLink } from '@wordpress/components';
+import { Button } from '@wordpress/components';
+import { Link as UILink } from '@wordpress/ui';
import { compose } from '@wordpress/compose';
import interpolateComponents from '@automattic/interpolate-components';
import PropTypes from 'prop-types';
@@ -124,7 +125,7 @@ export class ShippingBanner extends Component {
} );
return;
}
- } catch ( error ) {
+ } catch {
this.setState( {
setupErrorReason: setupErrorTypes.INSTALL,
wcsSetupError: true,
@@ -145,7 +146,7 @@ export class ShippingBanner extends Component {
} );
return;
}
- } catch ( error ) {
+ } catch {
this.setState( {
setupErrorReason: setupErrorTypes.ACTIVATE,
wcsSetupError: true,
@@ -487,17 +488,15 @@ export class ShippingBanner extends Component {
),
components: {
tosLink: (
- <ExternalLink
- href="https://wordpress.com/tos"
- target="_blank"
- type="external"
+ <UILink
+ href="https://automattic.com/tos/"
+ openInNewTab
/>
),
wcsLink: (
- <ExternalLink
+ <UILink
href="https://woocommerce.com/products/shipping/?utm_medium=product"
- target="_blank"
- type="external"
+ openInNewTab
onClick={
this
.woocommerceServiceLinkClicked
diff --git a/plugins/woocommerce/client/admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/test/index.js b/plugins/woocommerce/client/admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/test/index.js
index 07e3d58463f..ecc09a9f689 100644
--- a/plugins/woocommerce/client/admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/test/index.js
+++ b/plugins/woocommerce/client/admin/client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/test/index.js
@@ -913,7 +913,7 @@ describe( 'The message in the banner', () => {
);
const notActivatedMessage =
- 'By clicking "Create shipping label", WooCommerce Shipping↗ will be installed and you agree to its Terms of Service↗.';
+ 'By clicking "Create shipping label", WooCommerce Shipping will be installed and you agree to its Terms of Service.';
it( 'should show install text "By clicking "Create shipping label"..." when first loaded.', () => {
const { container } = createShippingBannerWrapper( {
diff --git a/plugins/woocommerce/client/admin/docs/features/core-profiler.md b/plugins/woocommerce/client/admin/docs/features/core-profiler.md
index fc7d7925224..5e4644eec80 100644
--- a/plugins/woocommerce/client/admin/docs/features/core-profiler.md
+++ b/plugins/woocommerce/client/admin/docs/features/core-profiler.md
@@ -222,7 +222,7 @@ The `from=woocommerce-core-profiler` parameter is what the WordPress.com side (C
## Terms of Service acceptance notice
-Some of the extensions require the merchant to agree to the WordPress.com [Terms of Service](https://wordpress.com/tos/). When one of these extensions is selected, the Extensions page renders a notice below the list: "By installing _{plugin names}_ plugin(s) for free you agree to our Terms of Service."
+Some of the extensions require the merchant to agree to the Automattic [Terms of Service](https://automattic.com/tos/). When one of these extensions is selected, the Extensions page renders a notice below the list: "By installing _{plugin names}_ plugin(s) for free you agree to our Terms of Service."
This notice is rendered by the `PluginsTermsOfService` component in [`client/core-profiler/pages/Plugins/components/plugin-terms-of-service/PluginsTermsOfService.tsx`](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/client/admin/client/core-profiler/pages/Plugins/components/plugin-terms-of-service/PluginsTermsOfService.tsx).
diff --git a/plugins/woocommerce/client/admin/eslint-suppressions.json b/plugins/woocommerce/client/admin/eslint-suppressions.json
index 7c4b7e65807..b9e5d0d11fa 100644
--- a/plugins/woocommerce/client/admin/eslint-suppressions.json
+++ b/plugins/woocommerce/client/admin/eslint-suppressions.json
@@ -359,11 +359,6 @@
"count": 1
}
},
- "client/wp-admin-scripts/print-shipping-label-banner/shipping-banner/index.js": {
- "@wordpress/use-recommended-components": {
- "count": 1
- }
- },
"client/wp-admin-scripts/woo-product-usage-notice/modal.js": {
"@wordpress/use-recommended-components": {
"count": 5
diff --git a/plugins/woocommerce/includes/admin/class-wc-admin-setup-wizard.php b/plugins/woocommerce/includes/admin/class-wc-admin-setup-wizard.php
index b3fe9e77d4b..af2e128f281 100644
--- a/plugins/woocommerce/includes/admin/class-wc-admin-setup-wizard.php
+++ b/plugins/woocommerce/includes/admin/class-wc-admin-setup-wizard.php
@@ -2167,7 +2167,7 @@ class WC_Admin_Setup_Wizard {
<?php
printf(
wp_kses_post( __( 'By connecting your site you agree to our fascinating <a href="%1$s" target="_blank">Terms of Service</a> and to <a href="%2$s" target="_blank">share details</a> with WordPress.com', 'woocommerce' ) ),
- 'https://wordpress.com/tos',
+ 'https://automattic.com/tos/',
'https://jetpack.com/support/what-data-does-jetpack-sync'
);
?>
diff --git a/plugins/woocommerce/src/Internal/Admin/Notes/WooCommercePayments.php b/plugins/woocommerce/src/Internal/Admin/Notes/WooCommercePayments.php
index 68d49126b8f..a965d61dc61 100644
--- a/plugins/woocommerce/src/Internal/Admin/Notes/WooCommercePayments.php
+++ b/plugins/woocommerce/src/Internal/Admin/Notes/WooCommercePayments.php
@@ -110,7 +110,7 @@ class WooCommercePayments {
sprintf(
/* translators: 1: opening link tag, 2: closing tag */
__( 'By clicking "Get started", you agree to our %1$sTerms of Service%2$s', 'woocommerce' ),
- '<a href="https://wordpress.com/tos/" target="_blank">',
+ '<a href="https://automattic.com/tos/" target="_blank">',
'</a>'
)
);