diff --git a/client/settings/express-checkout-settings/payment-request-button-preview.js b/client/settings/express-checkout-settings/payment-request-button-preview.js index 895c60dabfe..51f8a0bfca1 100644 --- a/client/settings/express-checkout-settings/payment-request-button-preview.js +++ b/client/settings/express-checkout-settings/payment-request-button-preview.js @@ -4,7 +4,7 @@ * External dependencies */ import { React, useState, useEffect, useContext } from 'react'; -import { __, sprintf } from '@wordpress/i18n'; +import { __ } from '@wordpress/i18n'; import { PaymentRequestButtonElement, useStripe, @@ -13,7 +13,6 @@ import { /** * Internal dependencies */ -import { shouldUseGooglePayBrand } from 'utils/express-checkout'; import InlineNotice from 'components/inline-notice'; import { WoopayExpressCheckoutButton } from 'wcpay/checkout/woopay/express-button/woopay-express-checkout-button'; import { @@ -27,43 +26,6 @@ import { import WCPaySettingsContext from '../wcpay-settings-context'; import { ExpressCheckoutPreviewComponent } from 'wcpay/express-checkout/blocks/components/express-checkout-preview'; -const isPaymentRequestSettingsPage = () => - document.getElementById( 'wcpay-express-checkout-settings-container' ) - ?.dataset.methodId === 'payment_request'; - -/** - * stripePromise is used to pass into 's stripe props. - * The stripe prop in can't be change once passed in. - * Keeping this outside of so that - * re-rendering does not change it. - */ - -const BrowserHelpText = () => { - if ( ! isPaymentRequestSettingsPage() ) return null; - - let browser = 'Google Chrome'; - let paymentMethodName = 'Google Pay'; - - if ( shouldUseGooglePayBrand() ) { - browser = 'Safari'; - paymentMethodName = 'Apple Pay'; - } - - return ( -

- { sprintf( - __( - /* translators: %1: Payment method name %2: Browser name. */ - 'To preview the %1$s button, view this page in the %2$s browser.', - 'woocommerce-payments' - ), - paymentMethodName, - browser - ) } -

- ); -}; - const buttonSizeToPxMap = { small: 40, medium: 48, @@ -91,7 +53,6 @@ const ButtonPreviewWrapper = ( { theme, children } ) => (
{ children }
- );