I
I
Irina Kirillova2017-04-28 19:07:13
PHP
Irina Kirillova, 2017-04-28 19:07:13

SyntaxError: Unexpected end of JSON input - has anyone come across this error after updating woocommerce?

Hello! Installed a new version of woocommerce on the site. An error occurs at the moment when the user has filled in all the fields with contact details for making a purchase and clicks the "Confirm order" button. Gets SyntaxError: Unexpected end of JSON input. The most interesting thing is that orders come to my admin panel. But the client thinks that he did not send the order.
In developer tools:
Uncaught ReferenceError: jQuery is not defined
at (index):399
checkout.min.js:1 Unable to fix malformed JSON Clicking
on at (index):399 highlights the line in yellow:
jQuery("body") .delegate("input[name=\"payment_method\"]", 'click', function(){
I contacted the hosting support, they answered me:
There is no admin-new-order.php file on the server, to which the path is specified in the template for ordering goods
WC_Email_New_Order->get_content_html, wc_get_template_html, wc_get_template, include('/plugins/woocommerce/templates/emails/admin-new-order.php' ).
We checked this path, it turned out to be incorrect. Missing wp-content folder.
You need to look in the template that is responsible for the new order 'WC_Email_New_Order'.
If anyone can give me some advice, please help. She is unable to figure it out herself. Thank you very much in advance.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
WordPress WooCommerce, 2017-04-29
@maxxannik

Install the Storefront theme. If it helps, then the problem is in the topic.
If not, then disable all plugins. If it helps, then enable the plugins until the error appears. So find out the culprit.
In 99% of cases, such a scheme helps to localize the problem.
Further depends on the problem.
In 90% of cases, the problem is in the topic. If you don't have a budget for developers, then you should use the Storefront theme. It is mature, well suited for typical commercial sites with a minimal budget. You can fit up to 10 tr per month.
The use of third-party themes is possible, but these are different budgets. For comfortable work, you need from 100 tr per month or more. Or constant adventures and problems. In most cases, this leads to the appearance of shitty sites that are painful to look at.
WP is a cool platform if the components and usage policy fits the budget. If you choose raw components with a small budget, you will get a bunch of problems.
Something like this.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question