@@ -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 29/31] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Slightly=20improve?=
=?UTF-8?q?=20the=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 && (
) }
From ed66f2bc05f423b541ac4dde57ce32285c2b4f90 Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Tue, 14 Jan 2025 12:36:03 +0100
Subject: [PATCH 30/31] =?UTF-8?q?=F0=9F=90=9B=20Fix=20incorrect=20componen?=
=?UTF-8?q?t=20path?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../resources/js/Components/Screens/SendOnlyMessage.js | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/ppcp-settings/resources/js/Components/Screens/SendOnlyMessage.js b/modules/ppcp-settings/resources/js/Components/Screens/SendOnlyMessage.js
index 56d780250..676b691eb 100644
--- a/modules/ppcp-settings/resources/js/Components/Screens/SendOnlyMessage.js
+++ b/modules/ppcp-settings/resources/js/Components/Screens/SendOnlyMessage.js
@@ -2,7 +2,7 @@ import { __, sprintf } from '@wordpress/i18n';
import Container from '../ReusableComponents/Container';
import SettingsCard from '../ReusableComponents/SettingsCard';
-import SettingsNavigation from './SettingsNavigation';
+import SettingsNavigation from './Settings/Components/Navigation';
const SendOnlyMessage = () => {
const settingsPageUrl = '/wp-admin/admin.php?page=wc-settings';
@@ -38,7 +38,7 @@ const SendOnlyMessage = () => {
__html: sprintf(
/* translators: 1: URL to the WooCommerce store location settings */
__(
- 'To activate PayPal, please update your WooCommerce store location to a supported region and connect a PayPal account eligible for receiving payments.',
+ 'To activate PayPal, please update your WooCommerce store location to a supported region and connect a PayPal account eligible for receiving payments.',
'woocommerce-paypal-payments'
),
settingsPageUrl
From ffc8dc8d6b3d0a288a4faa24433fb20f4418e859 Mon Sep 17 00:00:00 2001
From: Philipp Stracker
Date: Tue, 14 Jan 2025 12:36:34 +0100
Subject: [PATCH 31/31] =?UTF-8?q?=F0=9F=92=84=20Remove=20the=20gap=20at=20?=
=?UTF-8?q?the=20top=20of=20the=20screen?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../js/Components/ReusableComponents/TopNavigation.js | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/ppcp-settings/resources/js/Components/ReusableComponents/TopNavigation.js b/modules/ppcp-settings/resources/js/Components/ReusableComponents/TopNavigation.js
index 60bd19641..ee3ca7aaa 100644
--- a/modules/ppcp-settings/resources/js/Components/ReusableComponents/TopNavigation.js
+++ b/modules/ppcp-settings/resources/js/Components/ReusableComponents/TopNavigation.js
@@ -1,4 +1,4 @@
-import { useCallback } from '@wordpress/element';
+import { useCallback, useLayoutEffect } from '@wordpress/element';
import { Button, Icon } from '@wordpress/components';
import { chevronLeft } from '@wordpress/icons';
import classNames from 'classnames';
@@ -34,6 +34,11 @@ const TopNavigation = ( {
}
}, [ exitOnTitleClick, goToWooCommercePaymentsTab, onTitleClick ] );
+ // Removes the excess padding at the top of the navigation bar.
+ useLayoutEffect( () => {
+ window.dispatchEvent( new Event( 'resize' ) );
+ }, [] );
+
return (