From 20c3c6e34556e6c49ccab8b5193ba3d579f5c2a1 Mon Sep 17 00:00:00 2001 From: Narek Zakarian Date: Mon, 20 Jun 2022 17:12:58 +0400 Subject: [PATCH] Fix messaging display when the buttons are disabled. --- modules/ppcp-button/src/Assets/SmartButton.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index bdb6522e6..20af30ef4 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -840,7 +840,7 @@ class SmartButton implements SmartButtonInterface { 'messages' => $this->message_values(), 'labels' => array( 'error' => array( - 'generic' => __( + 'generic' => __( 'Something went wrong. Please try again or choose another payment source.', 'woocommerce-paypal-payments' ), @@ -1037,6 +1037,7 @@ class SmartButton implements SmartButtonInterface { $this->context() === 'product' && $this->settings->has( 'button_product_enabled' ) && $this->settings->get( 'button_product_enabled' ) + || $this->settings->has( 'message_product_enabled' ) ) { $load_buttons = true; } @@ -1050,6 +1051,7 @@ class SmartButton implements SmartButtonInterface { $this->context() === 'cart' && $this->settings->has( 'button_cart_enabled' ) && $this->settings->get( 'button_cart_enabled' ) + || $this->settings->has( 'message_product_enabled' ) ) { $load_buttons = true; }