Set a status for the new order, e.g., If it needs to be paid, use “Pending payment.” Save.
Let's add a function that checks if the order (1) has been paid for, and (2) doesn't have a flag set that we've already used the action — we'll use a ...
Here is where to place your code: add_action( ... Add a new field to the checkout; Add that new field to the order. Filters are used to:.
For this three possibilities: If you really want to do it on order place you would have to use the hook: woocommerce_new_order. However I ...
(if you allow it for paid orders), show purchase notes (if set), and in ...
Solved. This can be done with the woocommerce_thankyou action, as seen here: add_action( 'woocommerce_thankyou', 'my_callback'); ...
This will trigger after recieving order successfully, no matter how user made payment.
Get Order items and WC_Order_Item_Product in WooCommerce 3 · How ...
How to Add a Custom Order Action for WooCommerce
Instead of using woocommerce_pay_order_before_submit , you should try to hook in dedicated woocommerce_checkout_process action hook, ...