Fix PHPCS errors

This commit is contained in:
Daniel Dudzic 2024-04-09 23:44:51 +02:00
parent 7b499b3780
commit 708fcc0faa
No known key found for this signature in database
GPG key ID: 31B40D33E3465483
6 changed files with 118 additions and 90 deletions

View file

@ -415,10 +415,10 @@ class SmartButton implements SmartButtonInterface {
);
$has_paylater_block =
PayLaterBlockModule::is_block_enabled($this->settings_status) &&
has_block('woocommerce-paypal-payments/paylater-messages') ||
has_block('woocommerce-paypal-payments/checkout-paylater-messages') ||
has_block('woocommerce-paypal-payments/cart-paylater-messages');
PayLaterBlockModule::is_block_enabled( $this->settings_status ) &&
has_block( 'woocommerce-paypal-payments/paylater-messages' ) ||
has_block( 'woocommerce-paypal-payments/checkout-paylater-messages' ) ||
has_block( 'woocommerce-paypal-payments/cart-paylater-messages' );
$get_hook = function ( string $location ) use ( $default_pay_order_hook, $is_block_theme, $has_paylater_block ): ?array {
switch ( $location ) {
@ -638,9 +638,9 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
$has_paylater_block =
PayLaterBlockModule::is_block_enabled( $this->settings_status ) &&
has_block('woocommerce-paypal-payments/paylater-messages') ||
has_block('woocommerce-paypal-payments/checkout-paylater-messages') ||
has_block('woocommerce-paypal-payments/cart-paylater-messages');
has_block( 'woocommerce-paypal-payments/paylater-messages' ) ||
has_block( 'woocommerce-paypal-payments/checkout-paylater-messages' ) ||
has_block( 'woocommerce-paypal-payments/cart-paylater-messages' );
switch ( $location ) {
case 'checkout':
@ -883,7 +883,7 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
break;
}
$setting_name_prefix = "pay_later_{$location}_message";
$setting_name_prefix = "pay_later_{$location}_message";
$layout = $this->settings->has( "{$setting_name_prefix}_layout" ) ? $this->settings->get( "{$setting_name_prefix}_layout" ) : 'text';
$logo_type = $this->settings->has( "{$setting_name_prefix}_logo" ) ? $this->settings->get( "{$setting_name_prefix}_logo" ) : 'primary';