I want to create a new order programmatically.
Workflow is simple: After submitting simple form, user will be created and along with that, a new order.
I managed
Unfortunately, I don't think there are no easy way to do this I'm afraid.
You need to add the order post using wp_insert_post(); and then add all the meta data using update_post_meta(). You then need to add the using woocommerce_add_order_item() and woocommerce_add_order_item_meta(). Lasty you need to set the order status using wp_set_object_terms().
It's quite a lot of steps and pitfalls. You need to check your database carefully and add all the data and meta data you need to process and complete the order.