Hi there!
Is it possible to “do something ” in funtions.php when user is clicking on payment method radio button on checkout page ?
What actions do you want to see performed at checkout?
Generally speaking, to perform an action when a user clicks on the payment method radio button on the checkout page, you can use jQuery to listen for the event and then execute your desired function.
Hope this helps.
I need to a show/hide a html element
Hi there
Thank you for explaining what you’re trying to accomplish.
To show or hide an HTML element using jQuery, you can use the .show(), .hide() or .toggle() methods. Here are some online resources that can guide you on how to use these methods:
jQuery official documentation:
W3Schools tutorials:
Hope this gets you going in the right direction. If you still need help with custom development tasks, we recommend that you seek help from the following:
Hope this helps!
Hello,
Thanks a lot about Jquery but the question was what is the correct WC hook to add these Jquery listeners on checkout page ?
thanks
Hi there @pipoulito 👋
Thanks a lot about Jquery but the question was what is the correct WC hook to add these Jquery listeners on checkout page ?
Feel free to refer to this visual hook guide of the Checkout page.
Moreover, a search with the term checkout in the WooCommerce Code Reference, linked here, for your convenience, would provide further code references.
I trust that points you in the right direction, but if you have more questions, let us know.
We’re happy to help.