mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 18:16:38 +08:00
Fix the script loading check.
This commit is contained in:
parent
de21866712
commit
a1454dbfd7
1 changed files with 10 additions and 6 deletions
|
@ -1092,9 +1092,10 @@ class SmartButton implements SmartButtonInterface {
|
||||||
}
|
}
|
||||||
if (
|
if (
|
||||||
$this->context() === 'product'
|
$this->context() === 'product'
|
||||||
&& ( $this->settings->has( 'button_product_enabled' )
|
&& (
|
||||||
&& $this->settings->get( 'button_product_enabled' )
|
( $this->settings->has( 'button_product_enabled' ) && $this->settings->get( 'button_product_enabled' ) ) ||
|
||||||
|| $this->settings->has( 'message_product_enabled' ) )
|
( $this->settings->has( 'message_product_enabled' ) && $this->settings->get( 'message_product_enabled' ) )
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
$load_buttons = true;
|
$load_buttons = true;
|
||||||
}
|
}
|
||||||
|
@ -1104,14 +1105,17 @@ class SmartButton implements SmartButtonInterface {
|
||||||
) {
|
) {
|
||||||
$load_buttons = true;
|
$load_buttons = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
if (
|
||||||
$this->context() === 'cart'
|
$this->context() === 'cart'
|
||||||
&& ( $this->settings->has( 'button_cart_enabled' )
|
&& (
|
||||||
&& $this->settings->get( 'button_cart_enabled' )
|
( $this->settings->has( 'button_cart_enabled' ) && $this->settings->get( 'button_cart_enabled' ) ) ||
|
||||||
|| $this->settings->has( 'message_product_enabled' ) )
|
( $this->settings->has( 'message_cart_enabled' ) && $this->settings->get( 'message_cart_enabled' ) )
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
$load_buttons = true;
|
$load_buttons = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $this->context() === 'pay-now' ) {
|
if ( $this->context() === 'pay-now' ) {
|
||||||
$load_buttons = true;
|
$load_buttons = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue