You can use woocommerce_new_order hook: add_action(' woocommerce_new_order', function ($order_id) { // your code }, 10, 1);.
[This thread is closed.] Hi all, I need to catch the order creation but I have some problems: 1) if I add woocommerce_new_order hook, and I retrieve…
Update 2 Only For Woocommerce 3+ (added restriction to execute the code only once). add_action('woocommerce_thankyou', 'enroll_student' ...
Try woocommerce_thankyou hook. This will trigger after recieving order successfully, no matter how user made payment. $hook_to = ' woocommerce_thankyou' ...
Add a new field to the checkout; Add that new field to the order.
WooCommerce Code Reference
Topic: Indicate when the webhook should be triggered – Order Created, Product Deleted, or Customer Updated. There are also Action and Custom options.
However, before a payment is made and after a checkout is place, an order is created. This hook is often ignored and not mention around. And this is the ...
As it was mentioned above hooks enable the creation of independent plugins and
It can mean many things in the WooCommerce and WordPress context and there are a ton of hook-releated results for that term. But in this case, ...