From 2516bb7dad8274bec204eb6e222c1db36801588d Mon Sep 17 00:00:00 2001
From: Pedro Silva
Date: Wed, 3 Jan 2024 13:48:57 +0000
Subject: [PATCH 1/3] Change ApplePay validation message.
---
modules/ppcp-applepay/src/Helper/AvailabilityNotice.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/modules/ppcp-applepay/src/Helper/AvailabilityNotice.php b/modules/ppcp-applepay/src/Helper/AvailabilityNotice.php
index e38f9a2c2..bbdcde159 100644
--- a/modules/ppcp-applepay/src/Helper/AvailabilityNotice.php
+++ b/modules/ppcp-applepay/src/Helper/AvailabilityNotice.php
@@ -273,7 +273,7 @@ class AvailabilityNotice {
$message = sprintf(
// translators: %1$s and %2$s are the opening and closing of HTML tag for the well-known file, %3$s and %4$s are the opening and closing of HTML tag for the help document.
__(
- 'Apple Pay Validation Error. Please ensure the presentment of the correct %1$sdomain association file%2$s for Apple to validate your domain. %3$sLearn more%4$s about the Apple Pay requirements',
+ 'Apple Pay has not yet been validated. Use the Apple Pay button in your shop for Apple to validate your domain. If this message persists after using the button, please verify your website displays the correct %1$sdomain association file%2$s. More details about the Apple Pay setup can be found in the %3$sPayPal Payments documentation%4$s.',
'woocommerce-paypal-payments'
),
'',
From a27e50de1bdce1ad84060cf3d0644332230e6886 Mon Sep 17 00:00:00 2001
From: Pedro Silva
Date: Wed, 3 Jan 2024 17:22:23 +0000
Subject: [PATCH 2/3] Fix PHP 8.2 deprecations.
---
modules/ppcp-button/src/Assets/SmartButton.php | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php
index ec2b5a395..d869def5e 100644
--- a/modules/ppcp-button/src/Assets/SmartButton.php
+++ b/modules/ppcp-button/src/Assets/SmartButton.php
@@ -1447,8 +1447,8 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
$context = 'general';
}
- return $this->get_style_value( "button_{$context}_${style}" )
- ?? $this->get_style_value( "button_${style}" )
+ return $this->get_style_value( "button_{$context}_{$style}" )
+ ?? $this->get_style_value( "button_{$style}" )
?? ( $default ? $this->normalize_style_value( $default ) : null )
?? $this->normalize_style_value( $defaults[ $style ] ?? '' );
}
@@ -1463,7 +1463,7 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
* @return string|int
*/
private function style_for_apm( string $style, string $apm, $default = null ) {
- return $this->get_style_value( "${apm}_button_${style}" )
+ return $this->get_style_value( "{$apm}_button_{$style}" )
?? ( $default ? $this->normalize_style_value( $default ) : null )
?? $this->style_for_context( $style, 'checkout' );
}
@@ -1584,14 +1584,14 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
* The filter returning the action name that will be used for rendering Pay Later messages.
*/
$hook = (string) apply_filters(
- "woocommerce_paypal_payments_${location_hook}_messages_renderer_hook",
+ "woocommerce_paypal_payments_{$location_hook}_messages_renderer_hook",
$default_hook
);
/**
* The filter returning the action priority that will be used for rendering Pay Later messages.
*/
$priority = (int) apply_filters(
- "woocommerce_paypal_payments_${location_hook}_messages_renderer_priority",
+ "woocommerce_paypal_payments_{$location_hook}_messages_renderer_priority",
$default_priority
);
return array(
@@ -1615,14 +1615,14 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
* The filter returning the action name that will be used for rendering Pay Later messages.
*/
$block_name = (string) apply_filters(
- "woocommerce_paypal_payments_${location_hook}_messages_renderer_block",
+ "woocommerce_paypal_payments_{$location_hook}_messages_renderer_block",
$default_block
);
/**
* The filter returning the action priority that will be used for rendering Pay Later messages.
*/
$priority = (int) apply_filters(
- "woocommerce_paypal_payments_${location_hook}_messages_renderer_block_priority",
+ "woocommerce_paypal_payments_{$location_hook}_messages_renderer_block_priority",
$default_priority
);
return array(
From b7d00e8c6ace519894552867e54b905e1ef90330 Mon Sep 17 00:00:00 2001
From: Pedro Silva
Date: Wed, 3 Jan 2024 17:30:15 +0000
Subject: [PATCH 3/3] Revert "Auxiliary commit to revert individual files from
a27e50de1bdce1ad84060cf3d0644332230e6886"
This reverts commit b0f4bd2ae20aacfa126be6577da9c032c2f4aeb8.
---
modules/ppcp-button/src/Assets/SmartButton.php | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php
index d869def5e..ec2b5a395 100644
--- a/modules/ppcp-button/src/Assets/SmartButton.php
+++ b/modules/ppcp-button/src/Assets/SmartButton.php
@@ -1447,8 +1447,8 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
$context = 'general';
}
- return $this->get_style_value( "button_{$context}_{$style}" )
- ?? $this->get_style_value( "button_{$style}" )
+ return $this->get_style_value( "button_{$context}_${style}" )
+ ?? $this->get_style_value( "button_${style}" )
?? ( $default ? $this->normalize_style_value( $default ) : null )
?? $this->normalize_style_value( $defaults[ $style ] ?? '' );
}
@@ -1463,7 +1463,7 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
* @return string|int
*/
private function style_for_apm( string $style, string $apm, $default = null ) {
- return $this->get_style_value( "{$apm}_button_{$style}" )
+ return $this->get_style_value( "${apm}_button_${style}" )
?? ( $default ? $this->normalize_style_value( $default ) : null )
?? $this->style_for_context( $style, 'checkout' );
}
@@ -1584,14 +1584,14 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
* The filter returning the action name that will be used for rendering Pay Later messages.
*/
$hook = (string) apply_filters(
- "woocommerce_paypal_payments_{$location_hook}_messages_renderer_hook",
+ "woocommerce_paypal_payments_${location_hook}_messages_renderer_hook",
$default_hook
);
/**
* The filter returning the action priority that will be used for rendering Pay Later messages.
*/
$priority = (int) apply_filters(
- "woocommerce_paypal_payments_{$location_hook}_messages_renderer_priority",
+ "woocommerce_paypal_payments_${location_hook}_messages_renderer_priority",
$default_priority
);
return array(
@@ -1615,14 +1615,14 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
* The filter returning the action name that will be used for rendering Pay Later messages.
*/
$block_name = (string) apply_filters(
- "woocommerce_paypal_payments_{$location_hook}_messages_renderer_block",
+ "woocommerce_paypal_payments_${location_hook}_messages_renderer_block",
$default_block
);
/**
* The filter returning the action priority that will be used for rendering Pay Later messages.
*/
$priority = (int) apply_filters(
- "woocommerce_paypal_payments_{$location_hook}_messages_renderer_block_priority",
+ "woocommerce_paypal_payments_${location_hook}_messages_renderer_block_priority",
$default_priority
);
return array(