From 8577594033878699c4164504e95a81ce1171c53e Mon Sep 17 00:00:00 2001 From: Philipp Stracker Date: Wed, 28 Aug 2024 13:41:55 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Remove=20the=20empty=20Apple=20P?= =?UTF-8?q?ay=20wrapper?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/ppcp-applepay/resources/js/ApplepayButton.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/ppcp-applepay/resources/js/ApplepayButton.js b/modules/ppcp-applepay/resources/js/ApplepayButton.js index 83b0a95b5..1c77a5c45 100644 --- a/modules/ppcp-applepay/resources/js/ApplepayButton.js +++ b/modules/ppcp-applepay/resources/js/ApplepayButton.js @@ -339,6 +339,12 @@ class ApplePayButton { this.#isInitialized = true; this.applePayConfig = config; + if ( this.isSeparateGateway ) { + document + .querySelectorAll( '#ppc-button-applepay-container' ) + .forEach( ( el ) => el.remove() ); + } + if ( ! this.isEligible ) { this.hide(); } else {