Something is redirecting the ajax endpoints to the checkout page, thus returning an invalid response.
Go to http://doremeandmaria.com/checkout/?test=1 and you’ll see it instantly redirects.
This needs to be prevented. Could be htaccess rule or something to do with your host.
Ah-hah! That explains all. A previous version of the site was pharmahacked and I’ve been stripping query strings via .htaccess with an exception for wp-admin.
With the new ajax features in woocommerce, it finally caught up with me.
I’ve added exceptions for checkout and cart, and now the checkout works, and I can also use the ‘x’ to delete items in the cart, which had stumped me before.
Thank you!
Holmpage,
I have the same problem. Don’t have a .htaccess file even though permalink settings should automatically generate one.
How exactly (new to coding) did you add exceptions for checkout and cart?
So I will try that in my yet to create .htaccess file.
Thanks in advance!
There could me many causes to the problem. If you are not intentionally redirecting query strings from the WordPress route using .htaccess (and if you don’t know what this means, then you definitely aren’t doing it), the cause of your problem is different than mine was. My client’s site had been hacked, which added thousands of URIs linking to other hacked sites selling brand name designer goods. I rebuilt the site in WP and used Webmaster Tools and .htaccess to get rid of the unwanted addresses so that the site could get properly indexed again. A sad tale of woe.
If you can’t see your .htaccess file using an FTP client (e.g. Filezilla), you’ll have to find the setting that allows you to show hidden files, which depends on the server. (In Filezilla you can try Server > Force showing hidden files.)
For those who do need to do this, to redirect query strings using .htaccess, you could use the following code. The ‘!’ means to add an exception for a directory, which has to be done for wp-admin in order for the WP backend to work. To solve this problem for WooCommerce I simply added the same exception to checkout and cart. Other plugins may have similar requirements. You should do more reading on .htaccess before you start playing with it. (There are good reasons for servers to hide it – one wrong move can break your site.)
# RewriteEngine On
# Options +FollowSymlinks
# RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^?]*)\?
# RewriteCond %{THE_REQUEST} !wp-admin
# RewriteCond %{THE_REQUEST} !checkout
# RewriteCond %{THE_REQUEST} !cart
# RewriteRule (.*) /$1? [R=301,L]