woocommerce_email_editor_preview_post_template_html
This file is part of the WooCommerce Email Editor package. Template canvas file to render the emails custom post type.
Usage
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
- -
Where the hook is called
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() );
Where the hook is used in WooCommerce
woocommerce/src/Internal/EmailEditor/Integration.php 143
add_filter( 'woocommerce_email_editor_preview_post_template_html', array( $this, 'update_preview_post_template_html_data' ), 100, 1 );