mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
Fix PHP 8.2 deprecation notices.
This commit is contained in:
parent
9ad2272907
commit
2348db69dc
1 changed files with 7 additions and 7 deletions
|
@ -1447,8 +1447,8 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
|
||||||
$context = 'general';
|
$context = 'general';
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->get_style_value( "button_{$context}_${style}" )
|
return $this->get_style_value( "button_{$context}_{$style}" )
|
||||||
?? $this->get_style_value( "button_${style}" )
|
?? $this->get_style_value( "button_{$style}" )
|
||||||
?? ( $default ? $this->normalize_style_value( $default ) : null )
|
?? ( $default ? $this->normalize_style_value( $default ) : null )
|
||||||
?? $this->normalize_style_value( $defaults[ $style ] ?? '' );
|
?? $this->normalize_style_value( $defaults[ $style ] ?? '' );
|
||||||
}
|
}
|
||||||
|
@ -1463,7 +1463,7 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
|
||||||
* @return string|int
|
* @return string|int
|
||||||
*/
|
*/
|
||||||
private function style_for_apm( string $style, string $apm, $default = null ) {
|
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 )
|
?? ( $default ? $this->normalize_style_value( $default ) : null )
|
||||||
?? $this->style_for_context( $style, 'checkout' );
|
?? $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.
|
* The filter returning the action name that will be used for rendering Pay Later messages.
|
||||||
*/
|
*/
|
||||||
$hook = (string) apply_filters(
|
$hook = (string) apply_filters(
|
||||||
"woocommerce_paypal_payments_${location_hook}_messages_renderer_hook",
|
"woocommerce_paypal_payments_{$location_hook}_messages_renderer_hook",
|
||||||
$default_hook
|
$default_hook
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* The filter returning the action priority that will be used for rendering Pay Later messages.
|
* The filter returning the action priority that will be used for rendering Pay Later messages.
|
||||||
*/
|
*/
|
||||||
$priority = (int) apply_filters(
|
$priority = (int) apply_filters(
|
||||||
"woocommerce_paypal_payments_${location_hook}_messages_renderer_priority",
|
"woocommerce_paypal_payments_{$location_hook}_messages_renderer_priority",
|
||||||
$default_priority
|
$default_priority
|
||||||
);
|
);
|
||||||
return array(
|
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.
|
* The filter returning the action name that will be used for rendering Pay Later messages.
|
||||||
*/
|
*/
|
||||||
$block_name = (string) apply_filters(
|
$block_name = (string) apply_filters(
|
||||||
"woocommerce_paypal_payments_${location_hook}_messages_renderer_block",
|
"woocommerce_paypal_payments_{$location_hook}_messages_renderer_block",
|
||||||
$default_block
|
$default_block
|
||||||
);
|
);
|
||||||
/**
|
/**
|
||||||
* The filter returning the action priority that will be used for rendering Pay Later messages.
|
* The filter returning the action priority that will be used for rendering Pay Later messages.
|
||||||
*/
|
*/
|
||||||
$priority = (int) apply_filters(
|
$priority = (int) apply_filters(
|
||||||
"woocommerce_paypal_payments_${location_hook}_messages_renderer_block_priority",
|
"woocommerce_paypal_payments_{$location_hook}_messages_renderer_block_priority",
|
||||||
$default_priority
|
$default_priority
|
||||||
);
|
);
|
||||||
return array(
|
return array(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue