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() ;
How can I call the function :
process_payment($order_id)
when I don't have the $order_id yet and I have only the cart ?
(wrong question: there is no order_id yet)