WooCommerce hook for order creation from admin

时光总嘲笑我的痴心妄想 提交于 2019-11-29 08:47:38
S.V.

If you are using the admin page .../wp-admin/post-new.php?post_type=shop_order to create the new order then there may not be a WooCommerce hook to do this as this order is created by the WordPress core.

However, the WordPress action 'save_post_shop_order' will be called with the $post_ID which is the order id.

See function wp_insert_post() in ...\wp-includes\post.php.

You can use this hook woocommerce_process_shop_order_meta is is triggered when an order is manually created from the WordPress admin.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!