I’m currently experiencing an issue where on the checkout page for Woocommerce the order review section is stuck on an infinite buffer (see below). I have Googled around a lot and tried various things but nothing has worked so far.
On most of the support threads I’ve seen, people say they have been able to find what has been causing the issue in the logs or console of Chrome/Firefox however I have gone through these and found nothing at all.
When I delete the blockUI
div it gets rid of the buffer so that I can place a fake order. Here’s the interesting part: It still registers as an order and shows up in the Woocommerce Orders section and I get an email notification but it also displays an error which varies across browsers. On Chrome it displays
SyntaxError: Unexpected token <
But on Firefox it displays
SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 167 of the JSON data
Additionally, on IE it says SyntaxError: Invalid character
So I would like to know how to solve this issue. Please keep in mind that I have disabled all other plugins and that Woocommerce is the only plugin running and I have even set the theme to the 2015 WordPress default theme. I have heard that AJAX is the culprit so is there a way to disable AJAX on the checkout of Woocommerce and still have the checkout work? (I have Googled this and haven’t found a guide on how to disable AJAX)
I managed to work this one out myself.
I was having a look through the GET/POST logs and found that Woocommerce had a script called
blockUI
so I simply changed the name of the scripts (it has a minified version too) so that they wouldn’t be called.The scripts can be found at
/wp-content/plugins/woocommerce/assets/js/jquery-blockui/
Once I disabled these, there was no infinite buffer and no error (although I believe that is due to the error suppressing “fix” posted by the Woocommerce author found here.
Try this
In Config File write the following code:
For more details you can check the this link :
https://wordpress.org/support/topic/24-common-issue-syntaxerror-unexpected-token?replies=1