Duplicate Orders
-
I have now received at least my 3rd duplicate order from customers who contact me alarmed that Stripe charged twice. Each time there were two orders placed. Please help, and fix this. What do you need from me exactly? This is an extremely expensive issue as I now have to absorb huge processing fees, so let me know where I can send the invoice for those ??
-
When a customer is charged multiple times, it is almost always because you have some 3rd party plugin enabled that’s causing a PHP error during the checkout process. The PHP exception prevents WooCommerce from competing the order and it looks as if it’s unpaid. The customer then attempts to pay again.
You need to go to the WooCommerce > Status > Logs page and look for the “fatal-error” logs. There you will find which plugin is triggering the PHP exception.
You can also share that log file here if you don’t know how to interpret the output.
Thanks,
I have one of the best programmers in the world on call (seriously), and he checked everything and cannot see the issue on our end. Importantly, there are no errors in the logs for any of the times this happened and nothing in the logs related to these user ID or orders. This happened 5 or 6 times now in the last week, 2 more today.
I think a possibility is that the server is taking a little extra time to process the first click, and the user is clicking again. Some of them mentioned that “maybe they clicked it twice” but that should absolutely not happen, and if so is a major flaw in your plugin. The checkout button should be blocked until it has finished loading the first request. Can you please confirm if your plugin has this feature, or if we need to program this ourselves (which would be a little absurd)?
We found one thing, for the orders today that were duplicated, I am seeing something in the nginx logs.
upstream prematurely closed connection while reading response header from upstream
both of these happen on the https://127.0.0.1:8080/?wc-ajax=checkout url
So its probably related
That url is hit when the checkout button is pressed
But we don’t know what this means, so we are hoping it helps you understand.
I found something else thats weird
USER A – – [02/Dec/2022:14:16:55 +0000] “POST /?wc-ajax=checkout HTTP/1.0” 200 885
USER A- – [02/Dec/2022:14:15:55 +0000] “POST /?wc-ajax=checkout HTTP/1.0” 200 810
USER B – – [02/Dec/2022:09:28:14 +0000] “POST /?wc-ajax=checkout HTTP/1.0” 200 808
USER B – – [02/Dec/2022:09:29:14 +0000] “POST /?wc-ajax=checkout HTTP/1.0” 200 1042The duplicate request happens exactly 1 minute after the first request, like down to the second
I feel like this is to do with the Nginx setup of the server
Is this something I should contact Cloudways hosting about?
latest customer said they know they only pressed it once, and waited and it made two orders
I have one of the best programmers in the world on call (seriously), and he checked everything and cannot see the issue on our end.
Then your programmer probably informed you that WooCommerce has client side code that disables the checkout form submit functionality if a request to the server is already being processed. You can see that code here. That ensures that duplicate clicks cannot result in multiple requests being submitted to the server.
Some of them mentioned that “maybe they clicked it twice” but that should absolutely not happen, and if so is a major flaw in your plugin. The checkout button should be blocked until it has finished loading the first request. Can you please confirm if your plugin has this feature, or if we need to program this ourselves (which would be a little absurd)?
See comment above, WooCommerce has this in place already.
You can easily test this “double click” scenario by throttling your browser, which will allow you to click the Place Order many times before the order is processed. That is part of our unit tests before releasing plugin updates.
I’m happy to help your team troubleshoot the root cause of why you’re seeing duplicate orders. We can be reached here.
Thanks for replying but there were three pending updates, not sure why WordPress takes so long to approve replies.
Regarding the button, a customer mentioned that your plugin does not do what they expected and saw other places, like a “Please wait…” in the button text. So that would be good if you could add that please, even though it is not the issue here.
like a “Please wait…” in the button text
The Stripe plugin doesn’t render any Place wait… text for the Place Order button. That is most likely coming from the theme or another plugin.
`I feel like this is to do with the Nginx setup of the server
Is this something I should contact Cloudways hosting about?`
Good find, I believe that is related to the issue you’re seeing. Yes, if you don’t have direct access to your nginx configuration, then I’d contact your hosting provider and show them that article along with a description of the issue.
Kind Regards,
I think you read it backwards – I was asking this as a feature request – you SHOULD render the button as “Please wait…” because you currently do not and it would be a huge UX improvement.
I’m waiting to hear back from Cloudways ticket now.
Reply from Cloudways:
We have checked our nginx configuration and it already have required timeouts:
#params for nginx proxy backends
proxy_connect_timeout 1200;
proxy_send_timeout 1200;
proxy_read_timeout 1200;
client_max_body_size 400m;
client_body_buffer_size 128k;
proxy_buffer_size 128k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 256k;
proxy_temp_file_write_size 256k;
proxy_redirect off;
proxy_buffering off;If you wish for we changed any option – please let us know.
While your settings are addressing the timeout, they’re not addressing the failed request from being sent to the next available node. That is addressed by the
proxy_next_upstream error
setting.Hello,
To perhaps shed further insight. I came here seeking information for duplication issues, although my issue is not duplicate charges from what I can see, but issue was there were duplicate webhooks being created in the WP WC scheduler.
I’m not sure what the issue is, but it was with version 3.3.26. We’ve since reverted to 3.3.19 (our previous working version) and in the past 3 days we have not seen anymore duplicate webhook issues.
Again, this may or may not be related, and I’m not asking for support in this thread, just adding some info that may help identify the issue. Maybe something after 3.3.19 changed @mrclayton ?
Alright, hope you all figure it out!
Oops, disregard. I still see a duplication hook sending, so I’m saying now its not this plugin…
Hello, what was the solution of your problem @nelsonleemiller
- The topic ‘Duplicate Orders’ is closed to new replies.