• Resolved titsmaker

    (@titsmaker)


    Hi, I am trying to move my emails to Cron job via this filter:
    add_filter( 'woocommerce_defer_transactional_emails', '__return_true' );
    But it seems that nothing changes, my emails are still being sent immediately and while checking WP-Cron logs provided by WP Crontrol plugin I can’t see anything related to mail.
    Can you please advice how I can check if the hook is fired and tell me what’s the name of related Cron job?

    P.S. I am using SMTP mail plugin and my cron is managed via server

Viewing 2 replies - 1 through 2 (of 2 total)
  • One thing that might trip you up is that the background emails aren’t directly added to WP-Cron. They instead go through WP-Background-Processing with keys that look like “wp_1_wc_emailer_batch_4403b7d6fedac5a9e4cd16c1e25ef7b3” (I wrote a little bit about that here).

    But it sounds like they’re still sending too quickly to be explained by WP-Background-Processing picking them up? If so, it might be worth doing something like var_dump( $wp_filter['woocommerce_defer_transactional_emails'] ); to see if anything else is hooking that filter at a higher priority.

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Debugging deferred emails’ is closed to new replies.