From 3163593027e22eb83e12a13e4022d2f69fa4725e Mon Sep 17 00:00:00 2001 From: inpsyde-maticluznar Date: Fri, 11 Oct 2024 07:41:12 +0200 Subject: [PATCH] Don't render a button on single product page when vaulting is disabled --- .../js/modules/ContextBootstrap/SingleProductBootstap.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/ppcp-button/resources/js/modules/ContextBootstrap/SingleProductBootstap.js b/modules/ppcp-button/resources/js/modules/ContextBootstrap/SingleProductBootstap.js index 59e3a0d2c..a74214bd7 100644 --- a/modules/ppcp-button/resources/js/modules/ContextBootstrap/SingleProductBootstap.js +++ b/modules/ppcp-button/resources/js/modules/ContextBootstrap/SingleProductBootstap.js @@ -234,6 +234,11 @@ class SingleProductBootstap { this.errorHandler ); + if(!this.gateway.vaultingEnabled){ + return; + } + + if ( PayPalCommerceGateway.data_client_id.has_subscriptions && PayPalCommerceGateway.data_client_id.paypal_subscriptions_enabled