woocommerce_order_status_completed not triggered

后端 未结 6 1521
甜味超标
甜味超标 2020-12-10 04:19

I want to write a custom plugin that does some action after woocommerce order is completed, but I can\'t get this hook to work. I can see this question asked many times.

6条回答
  •  清歌不尽
    2020-12-10 05:23

    Try using action hook woocommerce_order_status_changed.
    It takes 4 parameters. order id, old status new status and order. Further code reference HERE

    This may not be exactly suitable to your requirement, but seems to be worth of an alternative. Hope this helps.

提交回复
热议问题