• Resolved mokkihiiri

    (@mokkihiiri)


    Problem: When customer pays for the digital product, he gets the download link correctly in the page, but doesn’t get the email at all.

    Other info:

    – Payments go via PayPal.
    When I try the payment with PayPal Sandbox, the email is sent, so as far as I know this problem occurs only in live environment.
    – I get the email that congratulates me for the sale, so at least I’m getting the email.
    – WP Mail Logging Log tells me that email is sent to me, but nothing is going to the customer.
    – Under Settings/Products I have granted access to downloadable products after payment.
    – In the email tab Completed order is enabled.
    – I started to use WP Mail SMTP Lite and Google gmail as my mailer because of this problem, but the problem is still on.

    Anything else I could try?

Viewing 4 replies - 1 through 4 (of 4 total)
  • mother.of.code

    (@imazed)

    The Mother of Code

    Hi!

    Wow, great list of steps, that’s super helpful to determine what’s happening! The fact that the email is not registered as sent tells me that it’s not being triggered; one reason for that could be that the order status is not correct. When working in the live environment, does the order status update to ‘processing’ or ‘complete’?

    If it does, it’s a good idea to run a conflict test. Something is likely getting in the way of the email being triggered, and turning everything off can show you whether that is indeed the case.

    Thread Starter mokkihiiri

    (@mokkihiiri)

    Hi!

    Thank you for your quick response! Yes the order status does update to completed. I run the conflict test later if I can’t figure anything else out, but meanwhile I did some debugging. I made a test purchase and didn’t get the email, so I checked the debug.log and found these interesting lines:

    [05-May-2020 20:19:06 UTC] PHP Notice: Undefined index: order in /home/*******/public_html/wp-content/plugins/woocommerce/includes/class-wc-checkout.php on line 205
    [05-May-2020 20:19:06 UTC] PHP Warning: Invalid argument supplied for foreach() in /home/*******/public_html/wp-content/plugins/woocommerce/templates/checkout/form-shipping.php on line 62

    Are these something that could help me?

    Thread Starter mokkihiiri

    (@mokkihiiri)

    Hi!

    I found out that I had made a mistake. When I was building my site, I thought that because I sell only digital products, I don’t need any billing details (address etc) from the customer. So I removed those with some code snippet. Well, that code snippet also included the email field so actually my site didn’t get the customers email address at all. I thought that the email set in the payment part was enough, but that was apparently just for the paypal to confirm payment.

    So this one is solved, thank you for your help!

    mother.of.code

    (@imazed)

    The Mother of Code

    Perfect, thanks for the update!

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Email not sent when ordering digital product’ is closed to new replies.