hook

Here is another Woocommerce hook that i used recently that is directly call after checkout but before an order is made, it is a Woocommerce after checkout hook. In this case, you can add more validation into it to prevent the order from being creating it. To do this, all you need to do is use the hook call 'woocommerce_after_checkout_validation' which gets call after checkout validation is made.

In this case, the validation is already completed but my session has expired. So i added an error notice so that my team can look into the error code and figure out what has gone wrong with this particular order. Of course, i emepty the cart so that the order cannot be create!