Get current Order ID for Woocommerce user cart

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 :

WC()->cart->get_total() ;

I tried many options. But I can’t get the $order_id .
Please Help.

Read more here: Get current Order ID for Woocommerce user cart

Leave a Reply

Your email address will not be published. Required fields are marked *