Is it possible to display these following radio buttons before payment gateways in check-out page:
-
"Pay at property"
Your card won’t be charged, we only need your card details to
guarantee your booking. -
"Pay now"
We will handle payment. You will receive a full refund if you change your mind before 31 December 2020.
Customers must choose one of these 2 buttons so one of these 2 buttons is required.
Then to make it appears in order mail for admin and customers.
If you have the solution, it will help me a lot !
2
Answers
I don’t know if it’s work
Using form in HTML that has 2 radials and group them in the same name attribute for required. That makes the customer have to choose one of them. And then POST the value from value attribute, so you can use the value for the next process you want
You can use
woocommerce_review_order_before_payment
action hook to display radio buttons before payment section in WooCommerce checkout page as follow:Code goes in functions.php file of your active child theme (or active theme). Tested and works.
Addition – For a better display you can use instead the following:
Related thread: Show/Hide WooCommerce Shipping Rates Based on Radio Buttons