skip to Main Content

I’m experimenting with some hooks, but which one should I use to trigger an action when the client presses the submit button on checkout page?

I’m trying to add a QR for each Order, so when the client goes to the place to get his product, the shop scan the QR and that order puts in a ‘completed’ status.

I’m using the woocommerce_thankyou, but is the best hook action to do it?

2

Answers


  1. 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

    Login or Signup to reply.
  2. The woocommerce_payment_complete hook is fired when the payment is completed.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search