Here is where to place your code: add_action(
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 ...
Payment gateways should be created as additional plugins that hook into WooCommerce.
You have to use WC() which is an alias of global $woocommerce to access WooCommerce related data, and to access cart information you ...
... noticed that WooCommerce doesn't have (unless I'm mistaken) a loader/ spinner animation show when you click on the “place order” button.
Next, we use the hook woocommerce_after_checkout_validation to check
If it helps, I will leave stripe payments enabled on my site.
An unsuspecting user might click the "Place Order" button first, which triggers
It allows to display the needed data on the Search page if no products have been found.
if($this != true){ //not allowed to place order because of data is not true }else{ //continue order } }