mirror of
https://github.com/10h30/ultimatemember.git
synced 2026-07-11 18:56:10 +09:00
Fix email template and localization
This commit is contained in:
+5
-3
@@ -36,16 +36,18 @@ class UM_Mail {
|
||||
$lang = icl_get_current_language() . '/';
|
||||
}
|
||||
} else {
|
||||
|
||||
$lang = get_locale();
|
||||
$arr_english_lang = array('en_US','en_NZ','en_ZA','en_AU','en_GB');
|
||||
|
||||
if( $lang == 'en_US' ){
|
||||
if( in_array( $lang, $arr_english_lang ) ){
|
||||
$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';
|
||||
} else {
|
||||
@@ -94,7 +96,7 @@ class UM_Mail {
|
||||
|
||||
// Convert tags in body
|
||||
$this->message = um_convert_tags( $this->message, $args );
|
||||
|
||||
|
||||
// Send mail
|
||||
wp_mail( $email, $this->subject, $this->message, $this->headers, $this->attachments );
|
||||
remove_filter( 'wp_mail_content_type', array(&$this, 'set_content_type') );
|
||||
|
||||
Reference in New Issue
Block a user