Bekir Kale
Bekir Kale

Reputation: 21

What is the hook that needs to be triggered on Post Order created with WooCommerce REST-API?

I need the hook to trigger when an order is created via REST-API with WooCommerce.

The hooks I tried are below and none of them worked.

save_post_shop_order
woocommerce_api_create_order
woocommerce_new_order
woocommerce_thankyou
woocommerce_rest_prepare_shop_order_object

Upvotes: 2

Views: 388

Answers (1)

mujuonly
mujuonly

Reputation: 11861

rest_insert_shop_order Use this hook.

Fires after a single post is created or updated via the REST API.

Upvotes: 1

Related Questions