mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Use the new way to check if block should be enabled
This commit is contained in:
parent
e0a232bb49
commit
1f5e32c0b0
3 changed files with 4 additions and 3 deletions
|
@ -631,7 +631,7 @@ 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 = has_block( 'woocommerce-paypal-payments/paylater-messages' ) && PayLaterBlockModule::is_enabled();
|
||||
$has_paylater_block = has_block( 'woocommerce-paypal-payments/paylater-messages' ) && PayLaterBlockModule::is_block_enabled( $this->settings_status );
|
||||
|
||||
switch ( $location ) {
|
||||
case 'checkout':
|
||||
|
@ -878,7 +878,7 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages
|
|||
'wrapper' => '#ppcp-messages',
|
||||
'is_hidden' => ! $this->is_pay_later_filter_enabled_for_location( $this->context() ),
|
||||
'block' => array(
|
||||
'enabled' => PayLaterBlockModule::is_enabled(),
|
||||
'enabled' => PayLaterBlockModule::is_block_enabled( $this->settings_status ),
|
||||
),
|
||||
'amount' => $amount,
|
||||
'placement' => $placement,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue