woocommerce_email_sent
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 string $id Email ID.
* @param WC_Email $email WC_Email instance.
*
* @return void
*/
function wp_kama_woocommerce_email_sent_action( $return, $id, $email ){
// action...
}
- $return(true|false)
- Whether the email was sent successfully.
- $id(string)
- Email ID.
- $email(WC_Email)
- WC_Email instance.
Changelog
| Since 5.6.0 | Introduced. |
Where the hook is called
woocommerce_email_sent
woocommerce/includes/emails/class-wc-email.php 1153
do_action( 'woocommerce_email_sent', $return, (string) $this->id, $this );