What hooks need to be triggered for post orders created using WooCommerce REST-API?
P粉373596828
P粉373596828 2024-03-28 22:05:47
0
1
361

I need to trigger a hook when creating an order via REST-API using WooCommerce.

The hooks I have tried are as follows, but none of them work.

save_post_shop_order
woocommerce_api_create_order
woocommerce_new_order
woocommerce_thankyou
woocommerce_rest_prepare_shop_order_object

P粉373596828
P粉373596828

reply all(1)
P粉415632319

rest_insert_shop_order Use this hook.

Triggered after creating or updating a single post via REST API.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!