woocommerce_email_sent хук-событиеWC 5.6.0

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 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.

Список изменений

С версии 5.6.0 Введена.

Где вызывается хук

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

Где используется хук в WooCommerce

Использование не найдено.