Best consistent post-order creation action/hook
-
I am using Woocomerce and, once an order is successfully paid, I need to make an API call to a third party website. I only want to send if the customer successfully pays. I have a plug-in place to do this, but am having some issues always getting it to fire.
What is the best action to hook into if a user successfully pays, but will only ever fire one time? If they only accept credit cards, is the best option
woocommerce_payment_complete
? Or is there a better option that will always work?I originally had it set to fire with
woocommerce_payment_complete
, but it never seems to fire, as, until we have the credit card portion setup, I am testing w/ COD as a payment method.I am able to get it to fire using
woocommerce_thankyou
but, if I understand it correctly, if the customer refreshes the “thank you” page, this would re-fire? If so, I don’t want that. Or I could check if an order has fired off, but that seems like extra work that shouldn’t bee needed.TIA!
- The topic ‘Best consistent post-order creation action/hook’ is closed to new replies.