Minor condition refactor

This commit is contained in:
Daniel Dudzic 2024-04-09 14:17:25 +02:00
parent 7672f66bcf
commit 00e1e16fa5
No known key found for this signature in database
GPG key ID: 31B40D33E3465483

View file

@ -637,12 +637,10 @@ document.querySelector("#payment").before(document.querySelector(".ppcp-messages
$messaging_enabled_for_current_location = $this->settings_status->is_pay_later_messaging_enabled_for_location( $location );
$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/cart-paylater-messages');
switch ( $location ) {
case 'checkout':