This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: SyntaxError: Unexpected token @ in JSON at position 0 on checkout with Avada theme

Solution: https://wpml.org/forums/topic/syntaxerror-json-parse-error-shown-when-i-checkout-in-woocommerce/#post-4500185

This topic contains 15 replies, has 2 voices.

Last updated by cailletC 1 month, 1 week ago.

Assigned support staff: Shekhar Bhandari.

Author Posts
September 1, 2019 at 1:23 am

cailletC

I am trying to checkout an order

Link to a page where the issue can be seen: hidden link

I expected to see the thank you page

Instead, I got the error SyntaxError: Unexpected token @ in JSON at position 0

I disabled every single plugin and left only wpml and woocommerce, but the problem persisted until i disabled WooCommerce Multilingual.
The problem also disapeared when i changed theme to frontstore.

I am not sure but maybe there is a conflict between avada theme and wpml?

September 2, 2019 at 4:57 am #4494367

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Welcome to WPML support. I'd be assisting you further on this issue.

Is the site login details you provided is of test site, can you disable the plugins so I can test it further?

Also, Could you please perform the below steps and share me the results?

Debugging

1. Please follow the debugging information provided here: http://wpml.org/documentation/support/debugging-wpml/ .
2. Repeat the action of creating the problem.
3. Copy and paste the contents of debug.log (log file inside the /wp-content/ directory) here for me to see.

Look forward to your reply.

Thanks

September 5, 2019 at 11:06 am #4518645

cailletC

Hello, sorry i didn't see your reply, i will make a test version of this website, and i will come back to you with what you asked today! thanks!

September 5, 2019 at 1:05 pm #4519477

cailletC

So i created a new test website where you can test further
hidden link

The problem is there, unfortunatly, there is nothing on the debug file. Maybe it's an ajax error?
What do you think?

September 5, 2019 at 1:06 pm #4519479

cailletC

If you need the new ftp and database access, where can i give it to you?

September 5, 2019 at 1:09 pm #4519485

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I have enabled the private reply for you so please send the login details and ftp details in the next private reply.

Look forward to your reply.

Thanks

September 5, 2019 at 1:23 pm
September 6, 2019 at 2:59 am #4522961

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

Yes, the login details is working perfectly, is it ok, if I disable/enable plugins on this site to debug the issue further?

Look forward to your reply.

Thanks

September 6, 2019 at 8:50 am #4524153

cailletC

Yes please ! Feel free to debug as you like.
Looking forward you answer.
Thanks a lot in avance !

September 6, 2019 at 9:09 am #4524241

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I tested a new product and added it to checkout but the error is not showing here, can you check it once? hidden link

Look forward to your reply.

Thanks

September 6, 2019 at 10:42 am #4524869

cailletC

I just tested, and the error showed. Please telle me how you did?
Did you try to order?

September 6, 2019 at 10:56 am #4524921

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I can see the issue when trying to order, I previous thought it's shown on checkout page itself.

Debugging the issue further, will respond to you soon.

Thanks

September 6, 2019 at 11:00 am #4524943

cailletC

Thank you do much

September 6, 2019 at 11:01 am #4524957

Shekhar Bhandari
Supporter

Languages: English (English )

Timezone: Asia/Kathmandu (GMT+05:45)

Hello there,

I just used the solution provided here and it works properly, so can you try the same on your live and let me know if this helps?
https://wpml.org/forums/topic/syntaxerror-json-parse-error-shown-when-i-checkout-in-woocommerce/#post-4500185

Look forward to your reply.

Thanks

September 6, 2019 at 12:02 pm #4525173

cailletC

Thank to the solution you have me, the Json error didnt show. Unfortunatly, it created another problem.
When you try to complet the order with virement bancaire or paiement par chèque, it takes for ever and it doesnt work in the end.
I had similar problem a few months ago. We didnt know what cause it but just diabled the stock management in the end and did it somehow.
https://wpml.org/forums/topic/avada-wpml-slow/page/3/

Hopefully it was clear. Can you please continue looking info this with us?