• Resolved weblex

    (@weblex)


    Hello.

    I have a problem with sending emails. Confirmations are sometimes sent email twice for a new order. It doesn’t happen every time, and it happens less often or more often for different customers.
    How can you prevent duplicate mailings?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hello @weblex,

    Thanks for reaching out.

    This is indeed unusual. I’d like to understand your site properly. Please share with us the necessary information below for us to investigate the issue further:

    System Status Report which you can find via WooCommerce > Status > Get system report > Copy for support and paste your reply via https://gist.github.com/ and send the link here.

    Once we have more information, we’ll be able to assist you further.

    Thread Starter weblex

    (@weblex)

    Hello @ckadenge

    Thank you for quick reply!

    There is link with information: https://gist.github.com/MarekWebleX/cf2b2ce824361f72241d0b7083e78db7

    • This reply was modified 9 months ago by weblex.
    Plugin Support Shameem R. a11n

    (@shameemreza)

    Hi @weblex,

    Thanks for sharing additional information.

    I noticed you’ve installed the WP Mail Logging plugin. Could you please check the mail log to confirm whether the notification was sent out twice? Also, did both emails get sent out instantly, or was there a gap between the first and the second?

    Could you check with your hosting provider to see if there are any issues on their end?

    Furthermore, please can you share a copy of the following:

    • Fatal Error log: Share a copy of any fatal error log found under WooCommerce → Status → Logs.

    You could copy and paste your reply or share it via Mozilla Community Pastebin and share the link here.

    In the meantime, you can run a conflict test to help you identify the cause of the issue. More info: https://woo.com/document/how-to-test-for-conflicts/

    Let us know how that goes for you. Looking forward to hearing from you!

    Thread Starter weblex

    (@weblex)

    Hello @shameemreza.

    Thank you for reply!

    There is link with WC fatal error log: https://paste.mozilla.org/BV74nm5e
    And there is link with WP mail Logging plugin log: https://paste.mozilla.org/oD1KX5jG

    As you can see, sometimes letters are sent one by one and sometimes two letters are sent with the same order number.

    Plugin Support omarfpg a11n

    (@omarfpg)

    Hi @weblex,

    Thank you for the additional details. From the error logs, there’s an issue with a plugin called “salbos”; I’m not familiar with it. Is it a custom plugin? Is it vital for running your site? Are you able to deactivate it temporarily to learn if this solves the issue?

    Regarding the email logs for the orders, can you share more details for orders 103272, 103268, 103254 and 103238? Do they have something in common in between?

    Thanks!

    All the best,
    Omar

    Thread Starter weblex

    (@weblex)

    Hello @omarfpg.

    I am sure that the problem is not with this plugin, because in my test I use the same plugin and there are no problems, it means that all the mails come one at a time.

    Yes, the common thing for everyone is that under order notifications, all notifications are double. Such a feeling that the client ordered twice, but actually paid only once.

    ?? hey @weblex

    Thank you for reaching back, clarifying things further.

    the common thing for everyone is that under order notifications, all notifications are double. Such a feeling that the client ordered twice, but actually paid only once.

    Could you please provide us with a screenshot so that we can see what you are describing?

    If you don’t already have a screenshot service installed, here are a few free options:

    https://snipboard.io
    https://skitch.com/
    https://getcloudapp.com/
    https://awesomescreenshot.com/
    There is also a walkthrough guide here: https://en.support.wordpress.com/make-a-screenshot/

    I have a problem with sending emails. Confirmations are sometimes sent email twice for a new order.

    I noticed the WP Mail Logging: by WP Mail Logging Team – 1.12.0 plugin is activated, in the site’s System Status Report (SSR).

    I’m curious, what has it registered about the double emails being sent out so far?

    We look forward to your response. In the meantime, please let us know if you have any further questions or concerns.

    Thread Starter weblex

    (@weblex)

    Hello @anastas10s

    I mean something like this: https://snipboard.io/1WckXZ.jpg.
    Or this: https://snipboard.io/f3Lunl.jpg

    I think the issue with double sending mails is related with this case. Why does WooCommerce confirm order twice?

    Hey, @weblex!

    I mean something like this:?https://snipboard.io/1WckXZ.jpg.
    Or this:?https://snipboard.io/f3Lunl.jpg

    Thanks for sharing the screenshots.

    On the order notes it seems like the payment was done twice, just to confirm, this is not the case, right? The customers only paid once?

    I think the issue with double sending mails is related with this case. Why does WooCommerce confirm order twice?

    We need to investigate this further to figure out.

    Are there any similarities between the orders where this happened? Such as same products being on all of them, being paid by the same payment gateway (stripe, square, woopayments, etc) or the same payment method (visa, master, deposit, etc), or having similar addresses, etc.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter weblex

    (@weblex)

    Hello @carolm29

    The problem is only with orders with “Processing” status. Orders with “Partially Paid” status are not duplicated and is perfectly fine.

    Hey, @weblex!

    The problem is only with orders with “Processing” status. Orders with “Partially Paid” status are not duplicated and is perfectly fine.

    All right, thanks!

    So this means that if you make a test order that gets the Processing status you are able to replicate the issue?

    If so, i see my colleague recommended a conflict test, but it was not clear to us if you were able to do it. If you didn’t, please run it now and check if the issue persists. I’ll share more details about it:

    To test, you’ll first want to change the theme on your site to Storefront, then check to see if the issue is still present. If that resolves the issue, you’ll want to get in touch with your theme’s developer and see if they have an update or fix for you.

    If changing the theme doesn’t help, you’ll want to deactivate all plugins except for WooCommerce and take a look. If that fixes the problem, re-enable the other plugins one by one (gradually), checking after each, to see where the issue is coming from.

    — Be sure you have a good backup in place of your full site and database. You can ask your host for backup functionality or you can consider using a service like Jetpack. If something goes wrong, you will be able to restore it.

    — Also, you can consider using a plugin like Health Check & Troubleshooting. This is a plugin developed by the WordPress community and it is helpful to disable plugins without affecting your current site visitors.

    — It is important to consider as well a staging functionality in case you would not like to touch your production site (you can ask your host if they offer this service), or you can use WP Staging for quickly spinning up a new test site.

    You can find more about this in this guide.

    Please let us know about your findings.

    Looking forward to your reply.

    Have a wonderful day!

    Thread Starter weblex

    (@weblex)

    Hello @carolm29

    Thank you for the answer.

    I understood what the problem was. If the customer successfully pays in the bank, a webhook is sent information about order status. When the customer returns to the “Thank you”-page, order status will be changed again. That’s why there’s a double status change and double mail send.

    Hi @weblex!

    Thank you for reaching out back and for sharing your findings about the problem; it is very likely that is what is happening.

    The question now would be: what is causing it?

    To know more about that, you could try performing a conflict test as recommended by my colleagues in a previous interaction.

    Here is more information on how to perform a conflict test:
    https://woo.com/document/how-to-test-for-conflicts/

    Let us know how it goes for you!

    Cheers!

    Thread Starter weblex

    (@weblex)

    Hello @judaguter

    I think I fixed the problem. I have changed the webhook script and it seems the problem was in the line: $order = wc_get_order( $order_id ); After removing it, there are no more problems.

    Thanks for the help and tips. You can now close the topic.

    Plugin Support ckadenge (woo-hc)

    (@ckadenge)

    Hi @weblex,

    I’m glad to hear that you were able to resolve the issue by modifying the webhook script!

    We’re always here to help you with any further issues or queries you might have in the future.

    Since you’ve confirmed the problem is resolved, I’ll go ahead and close this topic as per your request.

    Have a wonderful day.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Confirmations are sometimes sent email twice for a new order’ is closed to new replies.