Slow AJAX response causing errors
My site is for a non-profit and the online store includes physical products for sale and gives guests the ability to make a donation.
I received feedback from a customer say that they entered a donation amount and hit submit but just keep looping back to the same page.
It looks like wpcomethod is posting to admin-ajax.php every time a customer types a character in the "amount" field of the donation. Each time they type another character it sends another post request.
If the user hits the "submit" button before we get the response back from the server, it submits nothing (and thus returns the user to the product page).
Two things that will help/solve this problem:
1. Is there a way to force the "submit" "donate" or "buy now" buttons to wait -- only activate after we get the response from the post to admin-ajax?
2. Can you pause for a few ms and wait for a user to finish typing before sending the post to the server?
2. Is there a way to get a faster response? The response time is about 1.72S - 2.5S (seconds, not ms!) . It seems awfully long. If the response came in faster, then I wouldn't have this problem. Everything else on my site seems fast enough.
Here's a direct link to the product in question on my site: DONATE TO SFGMC
Here's a screen shot showing the post that gets aborted every time a character is typed.