Woocommerce – Add Action That Fires When Payment Processed?
-
Hi Guys,
Should hopefully be a simple question. How would I go about adding an action hook to woocommerce in my theme’s function.php file to insert or update a record in a separate database. I’m familiar with the wpdb class, so I’d like to use that if possible.
I’m still new to wp, but *believe* I could just add a do_action function that fires when the payment is processed by the resident woocommerce function…and since it is in the functions.php file (which I believe part of creating a child theme), it should withstand any updates to woocommerce or wordpress, correct?
If someone could provide me with an example of the do_action or add_action hook I should use to tie in the function, I think I could probably handle it from there. I’m just not sure what woocommerce function I should add it to? TIA!
- The topic ‘Woocommerce – Add Action That Fires When Payment Processed?’ is closed to new replies.