woocommerce_email_sent action-hookWC 5.6.0

Action hook fired when an email is sent.

Usage

add_action( 'woocommerce_email_sent', 'wp_kama_woocommerce_email_sent_action', 10, 3 );

/**
 * Function for `woocommerce_email_sent` action-hook.
 * 
 * @param bool     $return Whether the email was sent successfully.
 * @param int      $id     Email ID.
 * @param WC_Email $that   WC_Email instance.
 *
 * @return void
 */
function wp_kama_woocommerce_email_sent_action( $return, $id, $that ){

	// action...
}
$return(true|false)
Whether the email was sent successfully.
$id(int)
Email ID.
$that(WC_Email)
WC_Email instance.

Changelog

Since 5.6.0 Introduced.

Where the hook is called

WC_Email::send()
woocommerce_email_sent
woocommerce/includes/emails/class-wc-email.php 721
do_action( 'woocommerce_email_sent', $return, $this->id, $this );

Where the hook is used in WooCommerce

Usage not found.