Programming TipsWordPress Tips

WooCommerce Error On Checkout {“result”:”failure”,”messages”:”

Are you experiencing a random error upon checkout like the following?

{“result”:”failure”,”messages”:”
\n\t\t\t
Country<\/strong> is a required field.<\/li>\n\t\t\t
First Name<\/strong> is a required field.<\/li>\n\t\t\t
Last Name<\/strong> is a required field.<\/li>\n\t\t\t
Address<\/strong> is a required field.<\/li>\n\t\t\t
Town \/ City<\/strong> is a required field.<\/li>\n\t\t\t
Postcode \/ Zip<\/strong> is a required field.<\/li>\n\t\t\t
Email Address<\/strong> is a required field.<\/li>\n\t\t\t
Phone<\/strong> is a required field.<\/li>\n\t\t\t
You must accept our Terms & Conditions.<\/li>\n\t\t\t
Unfortunately we do not ship to to <\/strong>. Please enter an alternative shipping address.<\/li>\n\t\t\t
Invalid shipping method.<\/li>\n\t\t\t
Invalid payment method.<\/li>\n\t<\/ul>”,”refresh”:”false”,”reload”:”false”}

Yes? Fortunately, I was able to figure out how to fix this error quite quickly this morning. The issue has to do with WooCommerce pages. Updating WooCommerce to the latest versions seems to have the occasional effect of deleting some of the required pages. Yet, with the new version of WooCommerce, adding these pages back isn’t as easy as it used to be.

How To Fix WooCommerce Checkout Error

First, go into your database and into the table “options” (or wp_options, if you use the default prefix). Do a search for the option key ‘woocommerce_thanks_page_id’. Once you find it, note the page id that this corresponds with (the value), then go to http://yourwebsite.com/wp-admin/post.php?post=[put the page id from the database table here]&action=edit . If it comes up blank or non-existent, this means you need to create a new thank you page. Create the page (name it whatever you want), then take the new page ID and replace the woocommerce_thanks_page_id with it in the database.

That should do it! This resolved the issue on two different websites for us, so it seems to be a fix-all. Let me know if you have success!

Join the discussion 6 Comments

Leave a Reply

Allen Gingrich

Author Allen Gingrich

Allen has worked on the web for over a dozen years. Like many young entrepreneurs, he began with a small workspace in his basement, where he eventually formed Ideas and Pixels. The rest, well, is history. Allen enjoys fine wines, weight training, and beautiful, semantic code.

More posts by Allen Gingrich

Join the discussion 6 Comments

Leave a Reply