woocommerce/plugins/woocommerce-admin/client/task-lists/components/terms-of-service.js

48 lines
1.1 KiB
JavaScript
Raw Normal View History

Remove dependency on Jetpack from Shipping and Tax task list items (#39992) * Remove dependency on Jetpack from WCS&T's task list item - Remove installing Jetpack-the-plugin from WooCommerce Shipping & Tax WC Home task list and recommended extensions area. - Update Jetpack auth link generation to use getJetpackAuthUrl(). - Remove references of Jetpack-the-plugin from WCS&T onboarding as the extension will now use the Jetpack Connection package for establishing a connection between WPCOM infrastructure and a Woo site. * Update WooCommerce Tax flow in WC Home task list * Inline the agreementText variable * Add missing pluginSlugs prop to <Plugins> instance for WC Tax * Fix WC Tax extension name in API response * Remove Jetpack from copy in Tax task header * Fix MD034/no-bare-urls MD linting violation * Fix experimental shipping recommendation tests * Add changelogs requested by linter * Add changefile(s) from automation for the following project(s): @woocommerce/components, woocommerce * Remove mention of Jetpack from ExperimentalShippingRecommendation * Fix text wrapping bug in WC Tax onboarding task * Add changefile(s) from automation for the following project(s): @woocommerce/components, woocommerce * Use isResolving() to detect pending auth URL fetch * Replace unused hasErrors with ref to error * Fix lint * Jetpack auth URL prefetching * Revert "Jetpack auth URL prefetching" This reverts commit 2b79000e203f99ae5ceb8c4a3e6a1d1d6fbe4dc8. * Add PrefetchJetpackAuthUrl component to remove Connect button load time * Replace URL prefetching in component with useEffect * Fix: Accept redirect URL as param instead of prop * Fix lint * Remove prefetching. Make Connect button always available * Fix ExperimentalShippingRecommendation incompatibility with new Connect behavior * Handle empty object errors in Connect * Display TOS above WooCommerce Shipping & Tax installation buttons (#40863) --------- Co-authored-by: github-actions <github-actions@github.com>
2023-10-25 14:39:43 +00:00
/**
* External dependencies
*/
import { Text } from '@woocommerce/experimental';
import interpolateComponents from '@automattic/interpolate-components';
import { __, sprintf } from '@wordpress/i18n';
import { Link } from '@woocommerce/components';
export const TermsOfService = ( { buttonText } ) => (
<Text
variant="caption"
className="woocommerce-task__caption is-tos"
size="12"
lineHeight="16px"
style={ { display: 'block' } }
>
{ interpolateComponents( {
mixedString: sprintf(
__(
'By clicking "%s," you agree to our {{tosLink}}Terms of Service{{/tosLink}} and have read our {{privacyPolicyLink}}Privacy Policy{{/privacyPolicyLink}}.',
'woocommerce'
),
buttonText
),
components: {
tosLink: (
<Link
href={ 'https://wordpress.com/tos/' }
target="_blank"
type="external"
>
<></>
</Link>
),
privacyPolicyLink: (
<Link
href={ 'https://automattic.com/privacy/' }
target="_blank"
type="external"
>
<></>
</Link>
),
},
} ) }
</Text>
);