@@ -251,13 +247,12 @@ const AcdcFlow = ( { isFastlane, isPayLater, storeCountry } ) => {
diff --git a/modules/ppcp-settings/resources/js/Components/ReusableComponents/WelcomeDocs/BcdcFlow.js b/modules/ppcp-settings/resources/js/Components/ReusableComponents/WelcomeDocs/BcdcFlow.js
index 7fa58bca4..6856e7caf 100644
--- a/modules/ppcp-settings/resources/js/Components/ReusableComponents/WelcomeDocs/BcdcFlow.js
+++ b/modules/ppcp-settings/resources/js/Components/ReusableComponents/WelcomeDocs/BcdcFlow.js
@@ -97,8 +97,7 @@ const BcdcFlow = ( { isPayLater, storeCountry } ) => {
) }
titleType={ BADGE_BOX_TITLE_BIG }
description={ __(
- 'Accept debit/credit cards, PayPal, Apple Pay, Google Pay, and more.\n' +
- 'Note: Additional application required for more methods',
+ 'Accept debit/credit cards, PayPal, Apple Pay, Google Pay, and more. Note: Additional application required for more methods',
'woocommerce-paypal-payments'
) }
/>
@@ -159,13 +158,12 @@ const BcdcFlow = ( { isPayLater, storeCountry } ) => {
diff --git a/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/StepPaymentMethods.js b/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/StepPaymentMethods.js
index b6badf36c..5eeb51c5f 100644
--- a/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/StepPaymentMethods.js
+++ b/modules/ppcp-settings/resources/js/Components/Screens/Onboarding/StepPaymentMethods.js
@@ -17,14 +17,21 @@ const StepPaymentMethods = ( {} ) => {
const { storeCountry, storeCurrency } = CommonHooks.useWooSettings();
+ let screenTitle = __(
+ 'Add optional payment methods to your Checkout',
+ 'woocommerce-paypal-payments'
+ );
+
+ if ( 'US' === storeCountry ) {
+ screenTitle = __(
+ 'Add Expanded Checkout for More Ways to Pay',
+ 'woocommerce-paypal-payments'
+ );
+ }
+
return (
-
+
Date: Tue, 14 Jan 2025 12:04:20 +0100
Subject: [PATCH 2/2] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Slightly=20improve=20t?=
=?UTF-8?q?he=20BadgeBox=20component?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Components/ReusableComponents/BadgeBox.js | 58 +++++++++++++------
1 file changed, 40 insertions(+), 18 deletions(-)
diff --git a/modules/ppcp-settings/resources/js/Components/ReusableComponents/BadgeBox.js b/modules/ppcp-settings/resources/js/Components/ReusableComponents/BadgeBox.js
index 24dc36134..337e5626c 100644
--- a/modules/ppcp-settings/resources/js/Components/ReusableComponents/BadgeBox.js
+++ b/modules/ppcp-settings/resources/js/Components/ReusableComponents/BadgeBox.js
@@ -1,40 +1,62 @@
import data from '../../utils/data';
-const BadgeBox = ( props ) => {
- const titleSize =
- props.titleType && props.titleType === BADGE_BOX_TITLE_BIG
- ? BADGE_BOX_TITLE_BIG
- : BADGE_BOX_TITLE_SMALL;
+const ImageBadge = ( { images } ) => {
+ if ( ! images || ! images.length ) {
+ return null;
+ }
+
+ return (
+
+
+ { images.map( ( badge ) => data().getImage( badge ) ) }
+
+
+ );
+};
+
+// If `children` is not empty, it's output and wrapped in spaces.
+const BadgeContent = ( { children } ) => {
+ if ( ! children ) {
+ return null;
+ }
+ return <> { children } >;
+};
+
+const BadgeBox = ( {
+ title,
+ textBadge,
+ imageBadge = [],
+ titleType = BADGE_BOX_TITLE_BIG,
+ description = '',
+} ) => {
+ let titleSize = BADGE_BOX_TITLE_SMALL;
+ if ( BADGE_BOX_TITLE_BIG === titleType ) {
+ titleSize = BADGE_BOX_TITLE_BIG;
+ }
const titleTextClassName =
'ppcp-r-badge-box__title-text ' +
`ppcp-r-badge-box__title-text--${ titleSize }`;
const titleBaseClassName = 'ppcp-r-badge-box__title';
- const titleClassName = props.imageBadge
+ const titleClassName = imageBadge.length
? `${ titleBaseClassName } ppcp-r-badge-box__title--has-image-badge`
: titleBaseClassName;
+
return (
- { props.title }
+ { title }
- { props.imageBadge && (
-
- { props.imageBadge.map( ( badge ) =>
- data().getImage( badge )
- ) }
-
- ) }
-
- { props.textBadge }
+
+ { textBadge }
- { props?.description && (
+ { description && (
) }