woocommerce_email_editor_send_preview_email_before_wp_mail │ хук-событие │ WC 1.0

Sends an email preview.

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

add_action( 'woocommerce_email_editor_send_preview_email_before_wp_mail', 'wp_kama_woocommerce_email_editor_send_preview_before_wp_mail_action', 10, 3 );

/**
 * Function for `woocommerce_email_editor_send_preview_email_before_wp_mail` action-hook.
 * 
 * @param string $to      The recipient email address.
 * @param string $subject The subject of the email.
 * @param string $body    The body content of the email.
 *
 * @return void
 */
function wp_kama_woocommerce_email_editor_send_preview_before_wp_mail_action( $to, $subject, $body ){
	// action...
}
$to(строка)
The recipient email address.
$subject(строка)
The subject of the email.
$body(строка)
The body content of the email.

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

Send_Preview_Email::send_email()
woocommerce_email_editor_send_preview_email_before_wp_mail
woocommerce/packages/email-editor/src/Engine/class-send-preview-email.php 169
do_action( 'woocommerce_email_editor_send_preview_email_before_wp_mail', $to, $subject, $body );

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

woocommerce/src/Internal/EmailEditor/Integration.php 162
add_action( 'woocommerce_email_editor_send_preview_email_before_wp_mail', array( $this, 'send_preview_email_before_wp_mail' ), 10 );