You can't. You'll need to create an event listener on that button and, whenever it's clicked, you can call the function you wish.
Thank you for your response.
As the Button's class is generic and there are multiple Buttons that have the same class, how is one to assign an unique ID to the button to create an event listener on that button?
I haven't. Thanks for asking. Hoping someone has and can post it here.
Connect your PayPal account to allow your customers to checkout using the PayPal gateway a...By Ollie Jul 28, 2022