Adding code to an integrated wix button

Question:
Is there a way to modify the code of the wix checkout button to change its regular functionality?

Product:
Wix Studio

What are you trying to achieve:
In my wix cart page, i want to add code to the checkout button so it redirects to whatsapp instead of the regular wix checkout redirect.

What have you already tried:
i have also thought of adding a custom button over it but have found issues in replicating the responsiveness of the original.

Additional information:
Really need help with this!

I am not sure about checkout button but onAddToCart() and onBuyNow() event handlers are available in Wix, You can use those handlers for redirect

Or you can also write some code in masterpage.js that takes the redirects the user to WhatsApp whenever the checkout page is loaded.