WordPress filter hook

woocommerce_defer_transactional_emails

Defined by WooCommerce and fired by 4 plugins in total, running on 7M+ sites between them.

“Filter whether to defer transactional emails.”

How to use woocommerce_defer_transactional_emails

It's a filter: your callback receives the value, and must return the (changed) value. Add this to your theme's functions.php or a small custom plugin:

functions.php
add_filter( 'woocommerce_defer_transactional_emails', function( $defer_default ) {
	// Change $defer_default here.
	return $defer_default;
}, 10, 1 );

Argument names come from WooCommerce's source. Other plugins may pass different values: check the call in the plugin you're targeting below.

4 plugins that fire woocommerce_defer_transactional_emails

Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.

  1. WooCommerce icon WooCommerce7+ million installs apply_filters( 'woocommerce_defer_transactional_emails', $defer_default ) includes/class-wc-emails.php:138
  2. ATUM WooCommerce Inventory Management and Stock Tracking icon ATUM WooCommerce Inventory Management and Stock Tracking10,000+ installs apply_filters( 'woocommerce_defer_transactional_emails', FALSE ) classes/Inc/Hooks.php:1190
  3. Subscriptions & Recurring Payments for WooCommerce icon Subscriptions & Recurring Payments for WooCommerce10+ installs apply_filters( 'woocommerce_defer_transactional_emails', false ) inc/classes/class-awc-subscriptions-email.php:323
  4. ARN Smart AI-Powered Site Utilities for Elementor icon ARN Smart AI-Powered Site Utilities for ElementorFewer than 10 installs apply_filters( 'woocommerce_defer_transactional_emails', false ) includes/class-arnsmesu-woo-order-edit-cancel.php:71

Need a customisation built on this hook?

Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.