diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index e6dacecbe..1a03e982e 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -1092,9 +1092,10 @@ class SmartButton implements SmartButtonInterface { } if ( $this->context() === 'product' - && ( $this->settings->has( 'button_product_enabled' ) - && $this->settings->get( 'button_product_enabled' ) - || $this->settings->has( 'message_product_enabled' ) ) + && ( + ( $this->settings->has( 'button_product_enabled' ) && $this->settings->get( 'button_product_enabled' ) ) || + ( $this->settings->has( 'message_product_enabled' ) && $this->settings->get( 'message_product_enabled' ) ) + ) ) { $load_buttons = true; } @@ -1104,14 +1105,17 @@ class SmartButton implements SmartButtonInterface { ) { $load_buttons = true; } + if ( $this->context() === 'cart' - && ( $this->settings->has( 'button_cart_enabled' ) - && $this->settings->get( 'button_cart_enabled' ) - || $this->settings->has( 'message_product_enabled' ) ) + && ( + ( $this->settings->has( 'button_cart_enabled' ) && $this->settings->get( 'button_cart_enabled' ) ) || + ( $this->settings->has( 'message_cart_enabled' ) && $this->settings->get( 'message_cart_enabled' ) ) + ) ) { $load_buttons = true; } + if ( $this->context() === 'pay-now' ) { $load_buttons = true; }