• Resolved theseer1983

    (@theseer1983)


    I unchecked the option “Allow customers to place orders without an account” in WooCommerce > Settings > Accounts & Privacy. So that WooCommerce now creates a new account and automatically logs it in when you click “Place order” button on the checkout page. However, instead of proceeding to the payment, an error appears at the top of the checkout page: “Error! Nonce value is missing in the URL or Nonce verification failed.”. The error is gone when I navigate back to the cart page, and then return to the checkout page by clicking “Proceed to checkout” button. After that “Place order” button works fine (it proceeds to payment). However, that is a very bad user experience. Few users would try to navigate back and then return, they would abandon the cart instead. I have added the screenshot. Is there a fix for this problem?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support Shameem R. a11n

    (@shameemreza)

    Hello @theseer1983

    The error message you’re seeing, “Nonce value is missing in the URL or Nonce verification failed”, is related to a security feature in WordPress called “nonces” which is used to protect URLs and forms from certain types of misuse, malicious or otherwise.

    This issue can occur for several reasons, such as caching issues, plugin conflicts, or even theme conflicts. Here are a few steps you can take to troubleshoot this issue:

    1. If you’re using a caching plugin or a server-side caching solution provided by your host, please clear all caches.
    2. Temporarily disable all plugins except WooCommerce and see if the problem persists. If it goes away, enable them one by one to identify the source of the problem.
    3. Temporarily switch your theme to a default WordPress theme such as Twenty Twenty or Storefront and see if the problem persists. If it goes away, the issue might be with your theme.

    If none of these steps resolve the issue, I recommend contacting a WordPress developer or your hosting provider for further assistance.

    I hope this clarifies your concern. If you have any other questions, feel free to ask.

    Thread Starter theseer1983

    (@theseer1983)

    Thank you for your suggestions @shameemreza, I will investigate them. Hopefully something will work. And if not, I have a backup solution: to modify form-checkout.php WooCommerce template file and insert JavaScript block which will navigate the customer back to the cart page when that Nonce verification error occurs.

    • This reply was modified 1 year, 5 months ago by theseer1983.

    Hi @theseer1983

    That’s great to hear that you have a backup in place, that’s a good idea.

    However, please note that any changes to the core files of WooCommerce, including form-checkout.php, will be overwritten when the plugin is updated. I would recommend creating a child theme to override the template file. This way, your changes will be preserved even after an update.

    Please let us know how it goes, or if you have more questions.

    Thread Starter theseer1983

    (@theseer1983)

    Thank you for the warning @aguinaldodarla. I know about that issue, the same warning can be found inside that form-checkout.php file that I modified:

    <?php
    /**
    * Checkout form
    *
    * This template can be overridden by copying it to yourtheme/woocommerce/checkout/form-checkout.php.
    *
    * HOWEVER, on occasion WooCommerce will need to update template files and you
    * (the theme developer) will need to copy the new files to your theme to
    * maintain compatibility. We try to do this as little as possible, but it does
    * happen. When this occurs the version of the template file will be bumped and
    * the readme will list any important changes.
    *

    But what it does not mention inside the file, is that one should Clear template cache in WooCommerce settings afterwards, for the overriding to take effect.

    • This reply was modified 1 year, 4 months ago by theseer1983.
    • This reply was modified 1 year, 4 months ago by theseer1983.

    Hi @theseer1983

    That’s a good catch. We appreciate your vigilance in pointing it out. This step ensures that your website displays the most recent version of the file, incorporating all the changes you’ve made.

    Additionally, if you have any ideas that could improve the WooCommerce core plugin, feel free to submit an Enhancement request.

    If you have any other questions or need further assistance, please don’t hesitate to ask. We’re here to help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Nonce verification failed when placing order’ is closed to new replies.