woocommerce_email_sent
Action hook fired when an email is sent.
Использование
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 $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(строка)
- Email ID.
- $that(WC_Email)
- WC_Email instance.
Список изменений
| С версии 5.6.0 | Введена. |
Где вызывается хук
woocommerce_email_sent
woocommerce/includes/emails/class-wc-email.php 1136
do_action( 'woocommerce_email_sent', $return, (string) $this->id, $this );