Home › Forums › WoodMart support forum › woocommerce_checkout_process hook doesnt work properly › Reply To: woocommerce_checkout_process hook doesnt work properly
ytrofr
Hey,
Sorry i’ve pasted the wrong website, fixed in this message.
From my dev:
I tried to add new custom checkout validation using this
add_action(‘woocommerce_checkout_process’, function(){
wc_add_notice( __( ‘Please enter something into this new shiny field.’ ), ‘error’ );
});
This little sniplet should throw out error when trying to place order, but it didn’t
the message it should give him is that:
https://docs.woocommerce.com/wp-content/uploads/2012/04/WooCommerce-Codex-Checkout-Field-Notice.png
So pretty much these are the instructions:
1) He added the hook to functions.php
2) Tried to initiate it when going to checkout
3) not working