Home › Forums › WoodMart support forum › woocommerce_checkout_process hook doesnt work properly
woocommerce_checkout_process hook doesnt work properly
- This topic has 13 replies, 2 voices, and was last updated 4 years, 3 months ago by Artem Temos.
-
AuthorPosts
-
September 7, 2020 at 5:02 pm #224348
ytrofrParticipantHey,
tried to use this hook:
add_action(‘woocommerce_checkout_process’, function(){
wc_add_notice( __( ‘Please enter something into this new shiny field.’ ), ‘error’ );
});but the function won’t work. any idea?
September 8, 2020 at 6:05 am #224419
Artem TemosKeymasterHello,
Could you please check how it works with some default WordPress themes like TwentyTwenty or WooCommerce Storefront to understand is it our theme issue or not?
It is a WooCommerce hook and our theme has no relation to it.Regards
September 8, 2020 at 7:16 am #224440
ytrofrParticipantHey,
It does work with default theme twenty twenty, aso the problem is embeded within woodmart them3September 8, 2020 at 7:26 am #224449
Artem TemosKeymasterHi,
Please, describe to us your problems in a bit more details. Attach some screenshots and provide us with a list of steps on how to reproduce it on your website. Also, keep the default theme active so we can test how it works.
Thank you in advance.
September 8, 2020 at 7:44 am #224455
ytrofrParticipantI 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
September 8, 2020 at 8:22 am #224474
Artem TemosKeymasterPlease, send us a step by step instruction about how to see this code in action on your website. Switch to default theme so we can see how it works and provide us your admin access.
September 8, 2020 at 9:30 am #224507
ytrofrParticipantThe issue is pretty much straightforward, the hook doesnt funxtio funxtion properly
September 8, 2020 at 11:04 am #224535
Artem TemosKeymasterThe link you provided is not opening at all. And please, send us a step by step instruction about how to see this code in action on your website and switch to the default theme so we can see how it works and provide us your admin access.
September 8, 2020 at 11:36 am #224556
ytrofrParticipantHey,
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 workingSeptember 8, 2020 at 11:43 am #224561
Artem TemosKeymasterOK, please, switch to the default theme where this hook works so we can see.
Thank you
September 8, 2020 at 11:49 am #224574
ytrofrParticipantDone!
September 8, 2020 at 11:51 am #224576
Artem TemosKeymasterWhere exactly did you place the code in our theme? Please, send us a screenshot.
September 8, 2020 at 3:21 pm #224629
ytrofrParticipantI’m very much sorry, my dev mistaken live site with test site, that’s why we couldn’t see the notice of the hook.
Thanks for the wonderful support!
September 9, 2020 at 6:12 am #224749
Artem TemosKeymasterGreat, we are glad that you sorted it out.
-
AuthorPosts
Tagged: checkout, woocommerce
- You must be logged in to create new topics. Login / Register