UntitledGraphic
UntitledGraphic

Reputation: 1274

Endless spinning wheel at Woocommerce checkout

I am in the process of building a shop on wordpress using woocommerce. All is well except that at checkout there is an endless spinning wheel blocking the payment processing.

I have checked the error logs - which show no errors I have disabled all plug ins - which makes no difference I have reverted to the default woocommerce shopfront theme - which has the same result. The console shows no errors.

I have also followed the instructions here https://docs.woocommerce.com/document/endless-loadingspinner-on-the-checkout-page/ which assumes its a memory limit issue. This did not work.

So, after a bit of digging I found some reference here https://mikejolley.com/2015/11/12/debugging-unexpected-token-in-woocommerce-2-4/ and here https://www.maxsangster.com/blog/woocommerce-endless-loading-spinner-on-checkout/

Referring to these two pages I have been able to see that the json response from /?wc-ajax=checkout is just returning HTML which I would imagine is where the issue is.

However I am running an Apache server rather than Nginx as has been mentioned in some threads and articles. Assuming there is a server misconfiguration of the server or something that needs changing what might that be? Bearing in mind that I do not have direct access to this, so will need to be asking someone else to sort it out for me.

And finally if there is something else I can try what might that be?

Upvotes: 1

Views: 4513

Answers (4)

jerrycode
jerrycode

Reputation: 1

In my own case the redirection was the issue. So I had to delete the redirect I created via Cpanel.

Upvotes: 0

Westzone Solution
Westzone Solution

Reputation: 61

In my case the checkout was working fine on Desktop but not on Mobile. After many search on internet I read the solution of @UntitledGraphic.

I had set a redirect in ht-access. The redirect was showing a different home page for mobile. When I removed it, the error gone. I checked back & forth and was sure the ht-access redirect was the problem.

If you have set any redirect in the Htaccess then remove it. This will solve your issue in this case.

I also checked the redirect code on function.php instead of htaccess again the problem appeared. So finally removed the redirection.

Upvotes: 0

UntitledGraphic
UntitledGraphic

Reputation: 1274

Thank you to @plushyObject for generating the spark for this one.

The issue turned out that I had a legacy static html holding page in place as the site's homepage rather than having one set up with wordpress. Simply removing the .html page and letting wordpress's homepage take over solves the problem.

The moral of the story create your holding page in wordpress.

Upvotes: 2

plushyObject
plushyObject

Reputation: 1131

Go to Google Developer Tools, then Go to the Network tab. Click the button and make the request and let that bad boy spin out.

You mentioned the response is returning HTML. Click on the request that goes out that appears to be taking forever (/?wc-ajax=checkout) and then click on the Preview tab to display that HTML. I bet it shows an error or a clue, anyway.

Upvotes: 1

Related Questions