From cdd4a69bf572e0e290133e7fa27e41725f0cdccb Mon Sep 17 00:00:00 2001
From: Pedro Silva
Date: Mon, 3 Jul 2023 08:31:27 +0100
Subject: [PATCH] Fix lint
---
modules/ppcp-button/src/Assets/SmartButton.php | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php
index 4ba295547..68583f793 100644
--- a/modules/ppcp-button/src/Assets/SmartButton.php
+++ b/modules/ppcp-button/src/Assets/SmartButton.php
@@ -860,7 +860,7 @@ class SmartButton implements SmartButtonInterface {
'wrapper' => '#ppc-button-' . PayPalGateway::ID,
'mini_cart_wrapper' => '#ppc-button-minicart',
'cancel_wrapper' => '#ppcp-cancel',
- 'is_disabled' => $this->is_button_disabled(),
+ 'is_disabled' => $this->is_button_disabled(),
'mini_cart_style' => array(
'layout' => $this->style_for_context( 'layout', 'mini-cart' ),
'color' => $this->style_for_context( 'color', 'mini-cart' ),
@@ -1351,6 +1351,11 @@ class SmartButton implements SmartButtonInterface {
);
}
+ /**
+ * Checks if PayPal buttons/messages should be rendered for the current page.
+ *
+ * @return bool
+ */
protected function is_button_disabled(): bool {
if ( 'product' !== $this->context() ) {
return false;