From 7ee7cc82f8c0c7d2590699d4a4494ec723c13b15 Mon Sep 17 00:00:00 2001 From: Emili Castells Guasch Date: Mon, 26 Feb 2024 15:45:23 +0100 Subject: [PATCH] Exclude PayPal subscriptions products from automatic only payment gateways --- modules/ppcp-button/src/Assets/SmartButton.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/ppcp-button/src/Assets/SmartButton.php b/modules/ppcp-button/src/Assets/SmartButton.php index 63946488f..5801222ca 100644 --- a/modules/ppcp-button/src/Assets/SmartButton.php +++ b/modules/ppcp-button/src/Assets/SmartButton.php @@ -948,7 +948,10 @@ document.querySelector("#payment").before(document.querySelector("#ppcp-messages * @return bool */ private function has_subscriptions(): bool { - if ( ! $this->subscription_helper->accept_only_automatic_payment_gateways() ) { + if ( + ! $this->subscription_helper->accept_only_automatic_payment_gateways() + && $this->paypal_subscriptions_enabled() !== true + ) { return false; } if ( is_product() ) {