woocommerce_prepare_email_for_preview filter-hookWC 9.6.0

Allow to modify the email object before rendering the preview to add additional data.

Usage

add_filter( 'woocommerce_prepare_email_for_preview', 'wp_kama_woocommerce_prepare_email_for_preview_filter' );

/**
 * Function for `woocommerce_prepare_email_for_preview` filter-hook.
 * 
 * @param WC_Email $email The email object.
 *
 * @return WC_Email
 */
function wp_kama_woocommerce_prepare_email_for_preview_filter( $email ){

	// filter...
	return $email;
}
$email(WC_Email)
The email object.

Changelog

Since 9.6.0 Introduced.

Where the hook is called

EmailPreview::set_email_type()
woocommerce_prepare_email_for_preview
woocommerce/src/Internal/Admin/EmailPreview/EmailPreview.php 163
$this->email = apply_filters( 'woocommerce_prepare_email_for_preview', $this->email );

Where the hook is used in WooCommerce

Usage not found.