diff --git a/includes/class-haet-mail.php b/includes/class-haet-mail.php index fe1e04c..ef6ae39 100644 --- a/includes/class-haet-mail.php +++ b/includes/class-haet-mail.php @@ -719,14 +719,15 @@ public function load_template_file( $template_name ) { $template_path = locate_template( 'wp-html-mail/template.html' ); $upload_dir = wp_upload_dir(); $custom_template_path = trailingslashit( $upload_dir['basedir'] ) . 'wp-html-mail/template.html'; - $haet_path = HAET_MAIL_PATH . 'views/template/template.html'; - + if ( ! file_exists( $template_path ) ) { $template_path = $custom_template_path; if ( ! file_exists( $custom_template_path ) ) { $template_path = HAET_MAIL_PATH . 'views/template/template.html'; } } + + $template_path = apply_filters( 'haet_mail_template_path', $template_path ); if ( is_file( $template_path ) ) { ob_start(); @@ -739,7 +740,6 @@ public function load_template_file( $template_name ) { } - private function get_header( $options ) { $headerimg_placement = $options['headerimg_placement']; $link_header = apply_filters( 'haet_mail_link_header', true );