I am writing a plugin for woocommerce which needs the order ID before the users go to paypal and pays. I tried to get this information with several hooking on actions but all the time I get that $order_id is nothing/0. It seems that I hooked it too early, before I could get this by global vairable.
Do somebody knows what is the earliest function I can use to hook and get the $order_id or at least before the redirection to paypal?
Thanks very much!!!