Fix email template path

This commit is contained in:
jonfalcon
2016-02-29 18:32:31 -08:00
parent 0e9e5f2009
commit ab31640862
+12 -12
View File
@@ -39,25 +39,25 @@ class UM_Mail {
$lang = get_locale();
if( $lang == 'en_US' ){
$lang = '/';
}else{
$lang = '';
} else {
$lang .= '/';
}
}
if ( file_exists( get_stylesheet_directory() . '/ultimate-member/templates/email/' . $lang . $template . '.html' ) ) {
$template_path = get_stylesheet_directory() . '/ultimate-member/templates/email/' . $lang . $template . '.html';
}
if ( isset( $args['path'] ) ) {
$path = $args['path'] . $lang;
} else {
$path = um_path . 'templates/email/' . $lang;
}
if ( isset( $args['path'] ) ) {
$path = $args['path'] . $lang;
} else {
$path = um_path . 'templates/email/' . $lang;
}
if ( file_exists( $path . $template . '.html' ) ) {
$template_path = $path . $template . '.html';
if ( file_exists( $path . $template . '.html' ) ) {
$template_path = $path . $template . '.html';
}
}
return apply_filters( 'um_email_template_path', $template_path, $template, $args );
@@ -82,7 +82,7 @@ class UM_Mail {
if ( isset( $args['admin'] ) || isset( $args['plain_text'] ) ) {
$this->force_plain_text = 'forced';
}
// HTML e-mail or text
if ( um_get_option('email_html') && $this->email_template( $template, $args ) ) {