Hey there!
I am trying to call an action before submitting, when an order is placed in WooCommerce. I am trying to target the specific submit form like this:
- jQuery('form[name="checkout"]').submit(function(event) {
- alert( "Checkout submit!" );
- console.log('test');
- event.preventDefault();
- });
However, it doesn't seem to work. The page just submits the order like it has always done.
Can someone please point me in the right direction?
Thanks!