I am writing a PHP script and need to retrieve an order id. My question is, at what point is the order created and when could I edit it? Thank you in advance for your answer.
Question posted in Woocommerce
The official Woocommerce documentation can be found here.
The official Woocommerce documentation can be found here.
2
Answers
There are many hooks that allow update order to create a new order
few are :
You can use one of them(not both at a time)
Full Example:
Here you got order_id and order(full order info).
Now you can add/update/delete anything accordingly.
If you want to update the order late or at any time just pass order_id(eg.115) and perform the operation accordingly