diff --git a/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlocks/FeatureSettingsBlock.js b/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlocks/FeatureSettingsBlock.js
index 285da6896..c4ccc1d02 100644
--- a/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlocks/FeatureSettingsBlock.js
+++ b/modules/ppcp-settings/resources/js/Components/ReusableComponents/SettingsBlocks/FeatureSettingsBlock.js
@@ -46,6 +46,15 @@ const FeatureSettingsBlock = ( { title, description, ...props } ) => {
return ;
};
+ const renderDescription = () => {
+ return (
+
+ );
+ };
+
return (
@@ -56,7 +65,7 @@ const FeatureSettingsBlock = ( { title, description, ...props } ) => {
) }
- { description }
+ { renderDescription() }
{ printNotes() }
diff --git a/modules/ppcp-settings/resources/js/Components/Screens/Settings/Components/Overview/features-config.js b/modules/ppcp-settings/resources/js/Components/Screens/Settings/Components/Overview/features-config.js
index 46be5e521..76ad0d9b1 100644
--- a/modules/ppcp-settings/resources/js/Components/Screens/Settings/Components/Overview/features-config.js
+++ b/modules/ppcp-settings/resources/js/Components/Screens/Settings/Components/Overview/features-config.js
@@ -1,269 +1,290 @@
import { __ } from '@wordpress/i18n';
import { TAB_IDS, selectTab } from '../../../../../utils/tabSelector';
+import { payLaterMessagingComponentData } from '../../../../../data/settings/pay-later-messaging-component-data';
-export const getFeatures = ( setActiveModal ) => [
- {
- id: 'save_paypal_and_venmo',
- title: __( 'Save PayPal and Venmo', 'woocommerce-paypal-payments' ),
- description: __(
- 'Securely save PayPal and Venmo payment methods for subscriptions or return buyers.',
- 'woocommerce-paypal-payments'
- ),
- buttons: [
- {
- type: 'secondary',
- text: __( 'Configure', 'woocommerce-paypal-payments' ),
- onClick: () => {
- selectTab(
- TAB_IDS.PAYMENT_METHODS,
- 'ppcp-paypal-checkout-card'
- ).then( () => {
- setActiveModal( 'paypal' );
- } );
+export const getFeatures = ( setActiveModal ) => {
+ const storeCountry = ppcpSettings?.storeCountry;
+ const features = [
+ {
+ id: 'save_paypal_and_venmo',
+ title: __( 'Save PayPal and Venmo', 'woocommerce-paypal-payments' ),
+ description: __(
+ 'Securely save PayPal and Venmo payment methods for subscriptions or return buyers.',
+ 'woocommerce-paypal-payments'
+ ),
+ buttons: [
+ {
+ type: 'secondary',
+ text: __( 'Configure', 'woocommerce-paypal-payments' ),
+ onClick: () => {
+ selectTab(
+ TAB_IDS.PAYMENT_METHODS,
+ 'ppcp-paypal-checkout-card'
+ ).then( () => {
+ setActiveModal( 'paypal' );
+ } );
+ },
+ showWhen: 'enabled',
+ class: 'small-button',
},
- showWhen: 'enabled',
- class: 'small-button',
- },
- {
- type: 'secondary',
- text: __( 'Apply', 'woocommerce-paypal-payments' ),
- urls: {
- sandbox:
- 'https://www.sandbox.paypal.com/bizsignup/entry?product=ADVANCED_VAULTING',
- live: 'https://www.paypal.com/bizsignup/entry?product=ADVANCED_VAULTING',
+ {
+ type: 'secondary',
+ text: __( 'Apply', 'woocommerce-paypal-payments' ),
+ urls: {
+ sandbox:
+ 'https://www.sandbox.paypal.com/bizsignup/entry?product=ADVANCED_VAULTING',
+ live: 'https://www.paypal.com/bizsignup/entry?product=ADVANCED_VAULTING',
+ },
+ showWhen: 'disabled',
+ class: 'small-button',
},
- showWhen: 'disabled',
- class: 'small-button',
- },
- {
- type: 'tertiary',
- text: __( 'Learn more', 'woocommerce-paypal-payments' ),
- url: 'https://developer.paypal.com/studio/checkout/standard',
- class: 'small-button',
- },
- ],
- },
- {
- id: 'advanced_credit_and_debit_cards',
- title: __(
- 'Advanced Credit and Debit Cards',
- 'woocommerce-paypal-payments'
- ),
- description: __(
- 'Process major credit and debit cards including Visa, Mastercard, American Express and Discover.',
- 'woocommerce-paypal-payments'
- ),
- buttons: [
- {
- type: 'secondary',
- text: __( 'Configure', 'woocommerce-paypal-payments' ),
- onClick: () => {
- selectTab(
- TAB_IDS.PAYMENT_METHODS,
- 'ppcp-card-payments-card'
- ).then( () => {
- setActiveModal(
- 'advanced_credit_and_debit_card_payments'
+ {
+ type: 'tertiary',
+ text: __( 'Learn more', 'woocommerce-paypal-payments' ),
+ urls: {
+ sandbox: '#',
+ live: '#',
+ },
+ class: 'small-button',
+ },
+ ],
+ },
+ {
+ id: 'advanced_credit_and_debit_cards',
+ title: __(
+ 'Advanced Credit and Debit Cards',
+ 'woocommerce-paypal-payments'
+ ),
+ description: __(
+ 'Process major credit and debit cards including Visa, Mastercard, American Express and Discover.',
+ 'woocommerce-paypal-payments'
+ ),
+ buttons: [
+ {
+ type: 'secondary',
+ text: __( 'Configure', 'woocommerce-paypal-payments' ),
+ onClick: () => {
+ selectTab(
+ TAB_IDS.PAYMENT_METHODS,
+ 'ppcp-card-payments-card'
+ ).then( () => {
+ setActiveModal(
+ 'advanced_credit_and_debit_card_payments'
+ );
+ } );
+ },
+ showWhen: 'enabled',
+ class: 'small-button',
+ },
+ {
+ type: 'secondary',
+ text: __( 'Apply', 'woocommerce-paypal-payments' ),
+ urls: {
+ sandbox:
+ 'https://www.sandbox.paypal.com/bizsignup/entry?product=ppcp',
+ live: 'https://www.paypal.com/bizsignup/entry?product=ppcp',
+ },
+ showWhen: 'disabled',
+ class: 'small-button',
+ },
+ {
+ type: 'tertiary',
+ text: __( 'Learn more', 'woocommerce-paypal-payments' ),
+ url: 'https://developer.paypal.com/studio/checkout/advanced',
+ class: 'small-button',
+ },
+ ],
+ },
+ {
+ id: 'alternative_payment_methods',
+ title: __(
+ 'Alternative Payment Methods',
+ 'woocommerce-paypal-payments'
+ ),
+ description: __(
+ 'Offer global, country-specific payment options for your customers.',
+ 'woocommerce-paypal-payments'
+ ),
+ buttons: [
+ {
+ type: 'secondary',
+ text: __( 'Configure', 'woocommerce-paypal-payments' ),
+ onClick: () => {
+ selectTab(
+ TAB_IDS.PAYMENT_METHODS,
+ 'ppcp-alternative-payments-card'
);
- } );
+ },
+ showWhen: 'enabled',
+ class: 'small-button',
},
- showWhen: 'enabled',
- class: 'small-button',
- },
- {
- type: 'secondary',
- text: __( 'Apply', 'woocommerce-paypal-payments' ),
- urls: {
- sandbox:
- 'https://www.sandbox.paypal.com/bizsignup/entry?product=ppcp',
- live: 'https://www.paypal.com/bizsignup/entry?product=ppcp',
+ {
+ type: 'secondary',
+ text: __( 'Apply', 'woocommerce-paypal-payments' ),
+ url: 'https://developer.paypal.com/docs/checkout/apm/',
+ showWhen: 'disabled',
+ class: 'small-button',
},
- showWhen: 'disabled',
- class: 'small-button',
- },
- {
- type: 'tertiary',
- text: __( 'Learn more', 'woocommerce-paypal-payments' ),
- url: 'https://developer.paypal.com/studio/checkout/advanced',
- class: 'small-button',
- },
- ],
- },
- {
- id: 'alternative_payment_methods',
- title: __(
- 'Alternative Payment Methods',
- 'woocommerce-paypal-payments'
- ),
- description: __(
- 'Offer global, country-specific payment options for your customers.',
- 'woocommerce-paypal-payments'
- ),
- buttons: [
- {
- type: 'secondary',
- text: __( 'Configure', 'woocommerce-paypal-payments' ),
- onClick: () => {
- selectTab(
- TAB_IDS.PAYMENT_METHODS,
- 'ppcp-alternative-payments-card'
- );
+ {
+ type: 'tertiary',
+ text: __( 'Learn more', 'woocommerce-paypal-payments' ),
+ url: 'https://developer.paypal.com/docs/checkout/apm/',
+ class: 'small-button',
},
- showWhen: 'enabled',
- class: 'small-button',
- },
- {
- type: 'secondary',
- text: __( 'Apply', 'woocommerce-paypal-payments' ),
- url: 'https://developer.paypal.com/docs/checkout/apm/',
- showWhen: 'disabled',
- class: 'small-button',
- },
- {
- type: 'tertiary',
- text: __( 'Learn more', 'woocommerce-paypal-payments' ),
- url: 'https://developer.paypal.com/docs/checkout/apm/',
- class: 'small-button',
- },
- ],
- },
- {
- id: 'google_pay',
- title: __( 'Google Pay', 'woocommerce-paypal-payments' ),
- description: __(
- 'Let customers pay using their Google Pay wallet.',
- 'woocommerce-paypal-payments'
- ),
- buttons: [
- {
- type: 'secondary',
- text: __( 'Configure', 'woocommerce-paypal-payments' ),
- onClick: () => {
- selectTab(
- TAB_IDS.PAYMENT_METHODS,
- 'ppcp-card-payments-card'
- ).then( () => {
- setActiveModal( 'google_pay' );
- } );
+ ],
+ },
+ {
+ id: 'google_pay',
+ title: __( 'Google Pay', 'woocommerce-paypal-payments' ),
+ description: __(
+ 'Let customers pay using their Google Pay wallet.',
+ 'woocommerce-paypal-payments'
+ ),
+ buttons: [
+ {
+ type: 'secondary',
+ text: __( 'Configure', 'woocommerce-paypal-payments' ),
+ onClick: () => {
+ selectTab(
+ TAB_IDS.PAYMENT_METHODS,
+ 'ppcp-card-payments-card'
+ ).then( () => {
+ setActiveModal( 'google_pay' );
+ } );
+ },
+ showWhen: 'enabled',
+ class: 'small-button',
},
- showWhen: 'enabled',
- class: 'small-button',
- },
- {
- type: 'secondary',
- text: __( 'Apply', 'woocommerce-paypal-payments' ),
- urls: {
- sandbox:
- 'https://www.sandbox.paypal.com/bizsignup/add-product?product=payment_methods&capabilities=GOOGLE_PAY',
- live: 'https://www.paypal.com/bizsignup/add-product?product=payment_methods&capabilities=GOOGLE_PAY',
+ {
+ type: 'secondary',
+ text: __( 'Apply', 'woocommerce-paypal-payments' ),
+ urls: {
+ sandbox:
+ 'https://www.sandbox.paypal.com/bizsignup/add-product?product=payment_methods&capabilities=GOOGLE_PAY',
+ live: 'https://www.paypal.com/bizsignup/add-product?product=payment_methods&capabilities=GOOGLE_PAY',
+ },
+ showWhen: 'disabled',
+ class: 'small-button',
},
- showWhen: 'disabled',
- class: 'small-button',
- },
- {
- type: 'tertiary',
- text: __( 'Learn more', 'woocommerce-paypal-payments' ),
- url: 'https://developer.paypal.com/docs/checkout/apm/google-pay/',
- class: 'small-button',
- },
- ],
- notes: [
- __( '¹PayPal Q2 Earnings-2021.', 'woocommerce-paypal-payments' ),
- ],
- },
- {
- id: 'apple_pay',
- title: __( 'Apple Pay', 'woocommerce-paypal-payments' ),
- description: __(
- 'Let customers pay using their Apple Pay wallet.',
- 'woocommerce-paypal-payments'
- ),
- buttons: [
- {
- type: 'secondary',
- text: __( 'Configure', 'woocommerce-paypal-payments' ),
- onClick: () => {
- selectTab(
- TAB_IDS.PAYMENT_METHODS,
- 'ppcp-card-payments-card'
- ).then( () => {
- setActiveModal( 'apple_pay' );
- } );
+ {
+ type: 'tertiary',
+ text: __( 'Learn more', 'woocommerce-paypal-payments' ),
+ url: 'https://developer.paypal.com/docs/checkout/apm/google-pay/',
+ class: 'small-button',
},
- showWhen: 'enabled',
- class: 'small-button',
- },
- {
- type: 'secondary',
- text: __(
- 'Domain registration',
+ ],
+ notes: [
+ __(
+ '¹PayPal Q2 Earnings-2021.',
'woocommerce-paypal-payments'
),
- urls: {
- sandbox:
- 'https://www.sandbox.paypal.com/uccservicing/apm/applepay',
- live: 'https://www.paypal.com/uccservicing/apm/applepay',
+ ],
+ },
+ {
+ id: 'apple_pay',
+ title: __( 'Apple Pay', 'woocommerce-paypal-payments' ),
+ description: __(
+ 'Let customers pay using their Apple Pay wallet.',
+ 'woocommerce-paypal-payments'
+ ),
+ buttons: [
+ {
+ type: 'secondary',
+ text: __( 'Configure', 'woocommerce-paypal-payments' ),
+ onClick: () => {
+ selectTab(
+ TAB_IDS.PAYMENT_METHODS,
+ 'ppcp-card-payments-card'
+ ).then( () => {
+ setActiveModal( 'apple_pay' );
+ } );
+ },
+ showWhen: 'enabled',
+ class: 'small-button',
},
- showWhen: 'enabled',
- class: 'small-button',
- },
- {
- type: 'secondary',
- text: __( 'Apply', 'woocommerce-paypal-payments' ),
- urls: {
- sandbox:
- 'https://www.sandbox.paypal.com/bizsignup/add-product?product=payment_methods&capabilities=APPLE_PAY',
- live: 'https://www.paypal.com/bizsignup/add-product?product=payment_methods&capabilities=APPLE_PAY',
+ {
+ type: 'secondary',
+ text: __(
+ 'Domain registration',
+ 'woocommerce-paypal-payments'
+ ),
+ urls: {
+ sandbox:
+ 'https://www.sandbox.paypal.com/uccservicing/apm/applepay',
+ live: 'https://www.paypal.com/uccservicing/apm/applepay',
+ },
+ showWhen: 'enabled',
+ class: 'small-button',
},
- showWhen: 'disabled',
- class: 'small-button',
- },
- {
- type: 'tertiary',
- text: __( 'Learn more', 'woocommerce-paypal-payments' ),
- url: 'https://developer.paypal.com/docs/checkout/apm/apple-pay/',
- class: 'small-button',
- },
- ],
- },
- {
- id: 'pay_later_messaging',
- title: __( 'Pay Later Messaging', 'woocommerce-paypal-payments' ),
- description: __(
- 'Let customers know they can buy now and pay later with PayPal. Adding this messaging can boost conversion rates and increase cart sizes by 39%¹, with no extra cost to you—plus, you get paid up front.',
- 'woocommerce-paypal-payments'
- ),
- buttons: [
- {
- type: 'secondary',
- text: __( 'Configure', 'woocommerce-paypal-payments' ),
- onClick: () => {
- selectTab(
- TAB_IDS.PAYMENT_METHODS,
- 'ppcp-paypal-checkout-card'
- ).then( () => {
- setActiveModal( 'paypal' );
- } );
+ {
+ type: 'secondary',
+ text: __( 'Apply', 'woocommerce-paypal-payments' ),
+ urls: {
+ sandbox:
+ 'https://www.sandbox.paypal.com/bizsignup/add-product?product=payment_methods&capabilities=APPLE_PAY',
+ live: 'https://www.paypal.com/bizsignup/add-product?product=payment_methods&capabilities=APPLE_PAY',
+ },
+ showWhen: 'disabled',
+ class: 'small-button',
},
- showWhen: 'enabled',
- class: 'small-button',
- },
- {
- type: 'secondary',
- text: __( 'Apply', 'woocommerce-paypal-payments' ),
- urls: {
- sandbox: '#',
- live: '#',
+ {
+ type: 'tertiary',
+ text: __( 'Learn more', 'woocommerce-paypal-payments' ),
+ url: 'https://developer.paypal.com/docs/checkout/apm/apple-pay/',
+ class: 'small-button',
},
- showWhen: 'disabled',
- class: 'small-button',
- },
- {
- type: 'tertiary',
- text: __( 'Learn more', 'woocommerce-paypal-payments' ),
- url: 'https://developer.paypal.com/studio/checkout/pay-later/us',
- class: 'small-button',
- },
- ],
- },
-];
+ ],
+ },
+ ];
+
+ const countryData = payLaterMessagingComponentData[ storeCountry ] || {};
+
+ // Add "Pay Later Messaging" to the feature list, if it's available.
+ if (
+ !! window.ppcpSettings?.isPayLaterConfiguratorAvailable &&
+ countryData
+ ) {
+ features.push( {
+ id: 'pay_later_messaging',
+ title: __( 'Pay Later Messaging', 'woocommerce-paypal-payments' ),
+ description: __(
+ 'Let customers know they can buy now and pay later with PayPal. Adding this messaging can boost conversion rates and increase cart sizes by 39%¹, with no extra cost to you—plus, you get paid up front.',
+ 'woocommerce-paypal-payments'
+ ),
+ buttons: [
+ {
+ type: 'secondary',
+ text: __( 'Configure', 'woocommerce-paypal-payments' ),
+ onClick: () => {
+ selectTab(
+ TAB_IDS.PAYMENT_METHODS,
+ 'ppcp-paypal-checkout-card'
+ ).then( () => {
+ setActiveModal( 'paypal' );
+ } );
+ },
+ showWhen: 'enabled',
+ class: 'small-button',
+ },
+ {
+ type: 'secondary',
+ text: __( 'Apply', 'woocommerce-paypal-payments' ),
+ urls: {
+ sandbox: '#',
+ live: '#',
+ },
+ showWhen: 'disabled',
+ class: 'small-button',
+ },
+ {
+ type: 'tertiary',
+ text: __( 'Learn more', 'woocommerce-paypal-payments' ),
+ url: 'https://developer.paypal.com/studio/checkout/pay-later/us',
+ class: 'small-button',
+ },
+ ],
+ } );
+ }
+
+ return features;
+};
diff --git a/modules/ppcp-settings/resources/js/data/settings/pay-later-messaging-component-data.js b/modules/ppcp-settings/resources/js/data/settings/pay-later-messaging-component-data.js
new file mode 100644
index 000000000..13df867aa
--- /dev/null
+++ b/modules/ppcp-settings/resources/js/data/settings/pay-later-messaging-component-data.js
@@ -0,0 +1,106 @@
+import { __, sprintf } from '@wordpress/i18n';
+
+export const payLaterMessagingComponentData = {
+ US: {
+ description: sprintf(
+ __(
+ 'Your customers can already buy now and pay later with PayPal — add messaging to your site to let them know. PayPal’s Pay Later helps boost merchants\' conversion rates and increases cart sizes by 39%%.¹ You get paid in full up front. More about Pay Later',
+ 'woocommerce-paypal-payments'
+ ),
+ 'https://www.paypal.com/us/business/accept-payments/checkout/installments'
+ ),
+ notes: [
+ __( '¹PayPal Q2 Earnings-2021.', 'woocommerce-paypal-payments' ),
+ ],
+ },
+ GB: {
+ description: sprintf(
+ __(
+ 'Your customers can already buy now and pay later with PayPal — add messaging to your site to let them know. Pay in 3 gets a 216%% higher Average Order Value than a standard PayPal transaction.¹ There’s no extra cost and you get paid up front. More about Pay in 3',
+ 'woocommerce-paypal-payments'
+ ),
+ 'https://www.paypal.com/uk/business/accept-payments/checkout/installments'
+ ),
+ notes: [
+ __(
+ 'Based on PayPal internal data from Q1 2022, results include Pay in 3 (UK).',
+ 'woocommerce-paypal-payments'
+ ),
+ ],
+ },
+ FR: {
+ description: sprintf(
+ __(
+ 'Your customers can already buy now and pay later with PayPal — add messaging to your site to let them know. Pay in 4x gets a 65%% higher Average Order Value than a standard PayPal transaction.¹ There\'s no extra cost on top of your PayPal Checkout rate, and you get paid up front. More about Pay in 4x',
+ 'woocommerce-paypal-payments'
+ ),
+ 'https://www.paypal.com/fr/business/accept-payments/checkout/installments'
+ ),
+ notes: [
+ __(
+ 'Internal Data Analysis of 1124 SMB across integrated partners and non-integrated partners, November 2022. SMB internally defined as up to 100,000€ in annual estimated ecommerce online payment volume.',
+ 'woocommerce-paypal-payments'
+ ),
+ ],
+ },
+ AU: {
+ description: sprintf(
+ __(
+ 'Your customers can already buy now and pay later with PayPal — add messaging to your site to let them know. Pay in 4 gets more than a 100%% higher Average Order Value than a standard PayPal transaction.¹ There’s no extra cost and you get paid up front. More about Pay in 4',
+ 'woocommerce-paypal-payments'
+ ),
+ 'https://www.paypal.com/au/business/accept-payments/checkout/installments'
+ ),
+ notes: [
+ __(
+ 'Based on PayPal internal data from Q1 2022, results include Pay in 4 (AU). Consumer eligibility applies.',
+ 'woocommerce-paypal-payments'
+ ),
+ ],
+ },
+ IT: {
+ description: sprintf(
+ __(
+ 'Your customers can already buy now and pay later with PayPal — add messaging to your site to let them know. Pay in 3 installments gets about a 275%% higher Average Order Value than a standard PayPal transaction.¹ There\'s no extra cost on top of your PayPal Checkout rate, and you get paid up front. More about Pay in 3 installments',
+ 'woocommerce-paypal-payments'
+ ),
+ 'https://www.paypal.com/it/business/accept-payments/checkout/installments'
+ ),
+ notes: [
+ __(
+ 'Based on PayPal internal data from Q1 2022, results include Pay in 3 installments (IT).',
+ 'woocommerce-paypal-payments'
+ ),
+ ],
+ },
+ ES: {
+ description: sprintf(
+ __(
+ 'Your customers can already buy now and pay later with PayPal — add messaging to your site to let them know. Pay in 3 installments gets about a 275%% higher Average Order Value than a standard PayPal transaction.¹ There\'s no extra cost on top of your PayPal Checkout rate, and you get paid up front. More about Pay in 3 installments',
+ 'woocommerce-paypal-payments'
+ ),
+ 'https://www.paypal.com/es/business/accept-payments/checkout/installments'
+ ),
+ notes: [
+ __(
+ 'Based on PayPal internal data from Q1 2022, results include Pay in 3 installments (ES).',
+ 'woocommerce-paypal-payments'
+ ),
+ ],
+ },
+ DE: {
+ description: sprintf(
+ __(
+ 'Your customers can already buy now and pay later with PayPal — add messaging to your site to let them know. When you offer your customers Pay Later options, 57%% will be more likely to buy from you again.¹ There\'s no extra cost and you get paid up front. More about Pay Later',
+ 'woocommerce-paypal-payments'
+ ),
+ 'https://www.paypal.com/de/business/accept-payments/checkout/installments'
+ ),
+ notes: [
+ __(
+ 'Average order value in 2020 with PayPal installments compared to total PayPal sales.',
+ 'woocommerce-paypal-payments'
+ ),
+ ],
+ },
+};
diff --git a/modules/ppcp-settings/src/SettingsModule.php b/modules/ppcp-settings/src/SettingsModule.php
index 0b46cfdbf..742f0527c 100644
--- a/modules/ppcp-settings/src/SettingsModule.php
+++ b/modules/ppcp-settings/src/SettingsModule.php
@@ -185,6 +185,7 @@ class SettingsModule implements ServiceModule, ExecutableModule {
'wcPaymentsTabUrl' => admin_url( 'admin.php?page=wc-settings&tab=checkout' ),
'debug' => defined( 'WP_DEBUG' ) && WP_DEBUG,
'isPayLaterConfiguratorAvailable' => $is_pay_later_configurator_available,
+ 'storeCountry' => $container->get( 'wcgateway.store-country' ),
);
if ( $is_pay_later_configurator_available ) {