You can use a custom function hooked in woocommerce_checkout_order_processed action hook. Since woocommerce 3.0+ version, here Is ...
You can use each of these methods to get the product order ID and use it in your code or
You can get it like this: global $wp; $order_id = $wp->query_vars['order-pay']; $ order = new WC_Order( $order_id );.
Or maybe the order ID, customer ID, billing info, payment method, total
In WooCommerce I need to get order ID right in checkout page of WooCoommerce before payment when the order is createdI look at all sessi...
the WooCommerce Order ID in the WooCommerce Checkout page, ...
Remember that some endpoints, such as view-order, require an order ID to work.
WooCommerce 3.0+. you can get the order items of an order by $order = wc_get_order( $order_id ); $items = $order->get_items();. then if you loop through the ...
Used on the checkout page, the checkout shortcode displays the checkout process.
Well, you can easily get the order id from the key $_GET variable $order_id ...