WooCommerce: need hook when admin manually creates order

后端 未结 2 696
误落风尘
误落风尘 2020-12-29 17:12

One of my sites uses WooCommerce. The client wants to manually create orders occasionally from within order admin (WooCommerce > Orders > Add Order). I need to do some add

相关标签:
2条回答
  • 2020-12-29 17:51

    I've recently found that WooCommerce documentation is basically non-existent in a practical sense. However, have you tried either the woocommerce_admin_order_actions_end or woocommerce_admin_order_actions_start hooks?

    0 讨论(0)
  • 2020-12-29 17:54

    It looks like woocommerce_process_shop_order_meta will work for me,

    add_action( 'woocommerce_process_shop_order_meta', 'woocommerce_process_shop_order', 10, 2 );
    function woocommerce_process_shop_order ( $post_id, $post ) {
            // my code here
    }
    
    0 讨论(0)
提交回复
热议问题