• Resolved kevmatthews

    (@kevmatthews)


    Hi There, I’m having some struggles with woocommerce integration (Hosted WP 5.6 and woo 4.9)
    If I setup a send on event action for “product purchased” and select the product no email is sent once the order is completed within WooCommerce.
    If I go directly to the email and select email a list, then select woocommerce and products purchased it says 0 emails sent, even though I have several completed orders showing for that product.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Support jaysupport

    (@jaysupport)

    Hi kev,

    Do any emails created using our plugin get sent? If not, I would suggest you install an email logging plugin like https://www.ads-software.com/plugins/email-log/. This will track every email sent out from your WordPress. With that you’ll be able to see if the problem is that the email is not being sent or that it isn’t being received.

    What often happens is emails that are sent out automatically from WordPress are marked as spam/junk and, so, the recipient doesn’t get them in their inbox. Because of this we recommend using a plugin like WP Mail SMTP, which allows you to set it up so that these automatic emails are sent using an external SMTP server. Once you download and configure the plugin, it has a “send test email” option. Once that works, you can try again to see if you now get the email notifications.

    Alternatively, some users of our plugins have told us that simply creating an email address called [email protected] (replace domain.com with your actual domain name) has rectified the issue.

    Thread Starter kevmatthews

    (@kevmatthews)

    Thanks!
    Yes it’s really odd – if I manually pick a user to send the email to, it sends ok and shows in the stats as sent, just anything that integrates with WooCommerce doesn’t seem to trigger the actual send.

    I’ll give the email log plugin a try and double check if it’s trying to do anything at all ??

    Thread Starter kevmatthews

    (@kevmatthews)

    Ok, I’ve done some more testing.
    If I send the mail to a list and then select Woocommerce and “all previous purchasers” then hit send, then I get an email. If I try to email based on the specific product that was purchased then it doesn’t email. The rule based on event of send on purchase of the same product also doesn’t trigger.
    Looking at the email log – this agrees and shows nothing is attempted for a specific product purchase or an event of the same purchase.

    /edit – I’ve just created a new product and test purchased that and the same issue persists, almost like the plugin can’t see the product

    • This reply was modified 3 years, 8 months ago by kevmatthews.
    Plugin Support jaysupport

    (@jaysupport)

    Hi kev,

    I’m really sorry for the delayed response. Not sure how I missed your reply. We’ve done some more testing, just to confirm, and the email only sends if the purchase is paid for. So, if, for example, you have your shop set up with a payment option that allows people to pay later, or by check, or by any other means such that the payment isn’t collected on checkout, the email won’t send. This was originally by design, but we will be looking into offering a way to have it send even if it hasn’t been paid for.

    If your items are being paid for at checkout and the email still isn’t sending, then there is probably either a conflict or an issue with the way it’s set up. To check the former, would you be able to have a look at the debug log? You can enable it via the instructions here: https://www.ads-software.com/support/article/debugging-in-wordpress/#wp_debug_log

    Just note down the time when you’re attempting the checkout and then pull up the debug log for that time and, hopefully, you should see some kind of error where it tried to send the email. If you could share that with us, it would be great.

    If there is no error in there related to this, it really means that it isn’t at all trying to send any email. If that’s the case, and the items are paid for, it likely is a configuration error. For this, would you be able to share a screenshot of the send event that you have set up?

    One other thing to consider would be, do you have any other third-party WooCommerce extensions enabled? We haven’t heard recently of any conflicts with this, but you never know. It would be worth temporarily deactivating it/them and testing. And, if it does then work, please let us know which extension there is a conflict with.

    Thank you!

    Thread Starter kevmatthews

    (@kevmatthews)

    Hey Jay – thanks, no worries at ?? The purchase completes all the way through and payment is taken, I’ve run the debug and the error I’m seeing in the debug log is:

    PHP Notice: Undefined variable: All_Cat_IDs in /home3/[redacted]/public_html/wp-content/plugins/ultimate-wp-mail/Functions/EWD_UWPM_Send_On_Actions.php on line 362

    I have some other plugin’s enabled but given the error I don’t believe that this is related.

    Thanks

    Kev

    Plugin Support jaysupport

    (@jaysupport)

    Thanks for this. I’m not sure how if that notice would be related to the issue you are facing. I’m going to ask for this to be tested and I’ll get back to you shortly to see if it might have anything to do with your issue.

    Plugin Support jaysupport

    (@jaysupport)

    Hi kev,

    Unfortunately, it looks like that notice has nothing to do with the issue. We’re going to need to do more testing to see if we can find the root cause of this issue. I’ll keep you posted.

    Thread Starter kevmatthews

    (@kevmatthews)

    Hey Jay
    I’ve done a bit more testing – if I set the action to send on the purchase of any product it works ok and I get the email. If I set it to a specific product or category then it doesn’t work.
    Hope that helps

    Kev

    Thread Starter kevmatthews

    (@kevmatthews)

    Hey Jay – I just found this in my WP-Error log -does this help? It looks like it references the plugin:

    [15-Feb-2021 21:02:13 UTC] ID was called incorrectly. Product properties should not be accessed directly. Backtrace: require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), do_action(‘template_redirect’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::do_wc_ajax, do_action(‘wc_ajax_add_to_cart’), WP_Hook->do_action, WP_Hook->apply_filters, WC_AJAX::add_to_cart, WC_Cart->add_to_cart, do_action(‘woocommerce_add_to_cart’), WP_Hook->do_action, WP_Hook->apply_filters, EWD_UWPM_Track_Current_Cart, WC_Abstract_Legacy_Product->__get, wc_doing_it_wrong. This message was added in version 3.0.

    Is there anything else I can check? Should it create the email in a database somewhere or does it run a particular cron task?

    • This reply was modified 3 years, 8 months ago by kevmatthews.
    Plugin Support jaysupport

    (@jaysupport)

    Hi kev,

    We were finally able to track down the root cause of this issue. We’ve just released an update that fixes it. The Product Purchased send event is now correctly triggering.

    Thread Starter kevmatthews

    (@kevmatthews)

    Hey Jay!

    Thanks so much for this – I’ve just tested and it’s now working perfectly!

    Kev

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘woocommerce purchases not emailed’ is closed to new replies.