Hook to use when customer placing order

If you want to send data to third party service, then you want to trust this connection.

So using Thank You page isn’t the best idea.

There are some hooks that you may want to check and which of them will be the best for you depends on what exactly are you trying to achieve…

You can use:

  • woocommerce_new_order – it takes $order_id as first param and it’s called whenever a new order is placed in WC.

  • woocommerce_order_status_<status> – it also takes $order_id as first param and it will be called when the order changes status to (you can use processing, completed and so on as ).