From 561fac7bfcc25a38e6ad71d8e5e2ee02e9219e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A9sz=C3=A1ros=20R=C3=B3bert?= Date: Wed, 8 Apr 2020 17:01:57 +0300 Subject: [PATCH] Use the exposed cancel selector instead of hardcoded one --- modules.local/ppcp-button/resources/js/button.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.local/ppcp-button/resources/js/button.js b/modules.local/ppcp-button/resources/js/button.js index c62a597df..3f6bdc1db 100644 --- a/modules.local/ppcp-button/resources/js/button.js +++ b/modules.local/ppcp-button/resources/js/button.js @@ -31,7 +31,7 @@ const bootstrap = ()=> { // Configure checkout buttons jQuery( document.body ).on( 'updated_checkout', () => { - if ( jQuery('.ppcp-cancel').length ) { + if (document.querySelector(PayPalCommerceGateway.button.cancel_wrapper)) { return; }