woocommerce_email_editor_preview_post_template_html хук-фильтрWC 1.0

This file is part of the WooCommerce Email Editor package. Template canvas file to render the emails custom post type.

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

add_filter( 'woocommerce_email_editor_preview_post_template_html', 'wp_kama_woocommerce_email_editor_preview_post_template_html_filter' );

/**
 * Function for `woocommerce_email_editor_preview_post_template_html` filter-hook.
 * 
 * @param  $post 
 *
 * @return 
 */
function wp_kama_woocommerce_email_editor_preview_post_template_html_filter( $post ){

	// filter...
	return $post;
}
$post
-

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

В файле: /packages/email-editor/src/Engine/Templates/single-email-post-template.php
woocommerce_email_editor_preview_post_template_html
woocommerce/packages/email-editor/src/Engine/Templates/single-email-post-template.php 10
$template_html = apply_filters( 'woocommerce_email_editor_preview_post_template_html', get_post() );

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

woocommerce/src/Internal/EmailEditor/Integration.php 126
add_filter( 'woocommerce_email_editor_preview_post_template_html', array( $this, 'update_preview_post_template_html_data' ), 100, 1 );