Reputation: 58
I'm creating custom multi vendor script in my website. I've set authors (vendors) for woocommerce products and I want to set authors for orders too so I can determine which vendor's product sold.
I'm programmatically creating amazon and other market's orders so I can't use woocommerce thankyou function.
Simply I want to ask, how to hook into woocommerce order save function both works in frontend and backend?
Upvotes: 0
Views: 315
Reputation: 3869
woocommerce_new_order
(see). woocommerce_order_status_completed
or woocommerce_order_status_changed
woocommerce_checkout_create_order
, woocommerce_checkout_create_order
or woocommerce_payment_complete
would be for checkout actions only (see)All those hooks have the Order or order_id as a parameter or the new order status.
Upvotes: 1