From 2348db69dcebc9fbd66a7bc000a4c087000d8837 Mon Sep 17 00:00:00 2001
From: Pedro Silva
Date: Wed, 3 Jan 2024 17:34:58 +0000
Subject: [PATCH] Fix PHP 8.2 deprecation notices.
---
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(