Delay emails by more than 10 sec
-
I have enabled the defer of transactional emails with
add_filter( 'woocommerce_defer_transactional_emails', '__return_true' );
I would like to defer the order completed email by 600 seconds to allow Shippo push tracking info to my site. I have code to insert this info into the email.
I stepped through the code with Visual Studio Code but could not see how I could change the defer time. I even modified a few wp_schedule_event() calls in WooCommerce to change 10 to 600 (purely as a test) but emails are still being sent almost immediately.
I see the ‘woocommerce_allow_send_queued_transactional_email’ filter (with the order number and status change as args) but I’m not sure if returning false would be helpful.
How can I defer (some) emails for 10 minutes?
- The topic ‘Delay emails by more than 10 sec’ is closed to new replies.