mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-14 20:26:49 +09:00
Fix email template path
This commit is contained in:
+12
-12
@@ -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 ) ) {
|
||||
|
||||
Reference in New Issue
Block a user