Created
December 3, 2019 08:50
-
-
Save AshlinRejo/a5a7e94fca09d9d601aa9ba45c0deb40 to your computer and use it in GitHub Desktop.
Email Customizer: compatible with wpml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!function_exists('woo_email_customizer_load_language_for_sending_email_method')){ | |
function woo_email_customizer_load_language_for_sending_email_method($language, $template){ | |
if($language == 'fr-ch' || $language == 'fr_ch') { | |
$language = 'fr_CH'; | |
} | |
if($language == 'de-ch') { | |
$language = 'de_CH'; | |
} | |
if($language == 'de') { | |
$language = 'de_DE'; | |
} | |
if($language == 'fr-fr' || $language == 'fr') { | |
$language = 'fr_FR'; | |
} | |
return $language; | |
} | |
} | |
add_filter('woo_email_customizer_load_language_for_sending_email', 'woo_email_customizer_load_language_for_sending_email_method', 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment