How to get the checkout form data from checkout page when place-order button is clicked

The place-order form button is actually called woocommerce_checkout_place_order, and the code in WC_Form_Handler passes this on to WC_Checkout process_checkout(). Here’s the relevant code. You probably want to hook: woocommerce_before_checkout_process or woocommerce_checkout_process, which happen before this code reads the items from posted data itself (although you could call WC()->checkout()->get_posted_data() yourself I think) woocommerce_after_checkout_validation, which is passed … Read more