Update 2 Only For Woocommerce 3+ (added restriction to execute the code only once). add_action('woocommerce_thankyou', 'enroll_student' ...
To manipulate the passed variable, you can do something like the following:
Try woocommerce_thankyou hook. This will trigger after recieving order successfully, no matter how user made payment. $hook_to = ' woocommerce_thankyou' ...
Completed — Order fulfilled and complete – requires no further action. On hold — Awaiting ...
Action and Filter Hook Reference. This is simply a list of
Another useful action is woocommerce_payment_complete , called after the payment has been taken for an order. This is useful if you want to perform some ...
How to Hook Into WooCommerce to Trigger Something After an Order is Placed - Andy Sozot.
The emails that are sent to the customers after the purchase are marked up and they ...
woocommerce hook that happen immediately after an order before payment. This hook happen immediate after an order is made or after checkout is done.
I can also recommend the following places for more development-oriented questions:.