woocommerce_email_disabled
Fires when a transactional email is not sent because the email type is disabled.
Usage
add_action( 'woocommerce_email_disabled', 'wp_kama_woocommerce_email_disabled_action', 10, 2 );
/**
* Function for `woocommerce_email_disabled` action-hook.
*
* @param string $email_id The email type ID (e.g. `customer_processing_order`).
* @param WC_Email $email The WC_Email instance.
*
* @return void
*/
function wp_kama_woocommerce_email_disabled_action( $email_id, $email ){
// action...
}
- $email_id(string)
- The email type ID (e.g.
customer_processing_order). - $email(WC_Email)
- The WC_Email instance.
Changelog
| Since 10.9.0 | Introduced. |
Where the hook is called
woocommerce_email_disabled
woocommerce/includes/emails/class-wc-email.php 1150
do_action( 'woocommerce_email_disabled', $this->id, $this );
Where the hook is used in WooCommerce
woocommerce/src/Internal/Email/EmailLogger.php 48
add_action( 'woocommerce_email_disabled', array( $this, 'handle_woocommerce_email_disabled' ), 10, 2 );