I am adding a custom payment gateway to WP Woocommerce.
I want to get the current user order_id for the cart created.
I can get the cart total :
global $woocommerce; $total= $woocommerce->cart->total ;
or with :
I tried many options. But I can’t get the $order_id .
Read more here: Get current Order ID for Woocommerce user cart