Use the exposed cancel selector instead of hardcoded one

This commit is contained in:
Mészáros Róbert 2020-04-08 17:01:57 +03:00
parent 912ed1eeb6
commit 561fac7bfc

View file

@ -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;
}