From ab31640862f47cdab5f181fc711704a7d2aa6de3 Mon Sep 17 00:00:00 2001 From: jonfalcon Date: Mon, 29 Feb 2016 18:32:31 -0800 Subject: [PATCH] Fix email template path --- core/um-mail.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/core/um-mail.php b/core/um-mail.php index f4ef555a..6e35c0e6 100644 --- a/core/um-mail.php +++ b/core/um-mail.php @@ -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 ) ) {