Home > Software engineering >  Which is the best way to hooks an action after a purchase on woocommerce?
Which is the best way to hooks an action after a purchase on woocommerce?

Time:06-01

i'm trying some but which is the right hook to triggers an action after the client press the submit button??

CodePudding user response:

Your question is not clear. You should have given some more details of your requirements. In which context do you actually trigger the hook and for what purpose.

Btw, if you just want to trigger when an order placed, no matter is the order status, then use this one: Woocommerce_new_order

But if you want to trigger only when the order is completed then use this one woocommerce_order_status_completed

  • Related