WordPress WooCommerce Checkout – SyntaxError: Unexpected token < in JSON at position 0

Solution:

After debugging the code, I figured out that my problem was somewhere in the database, with the ID of the order that wasn’t saved properly (The value passed was always 0). My guess is that some plugin messed up my database.

The auto-increment was off in my database, so the ID of the order couldn’t be saved correctly, thus resulting the above error mentioned in the 1st post.

The solution was to fix the database, by adding auto-increment where it was needed and delete all the entries with 0 as ID in table wp_posts.