Created
October 14, 2015 16:44
-
-
Save greathmaster/c7a169825e79bbbb2e9f to your computer and use it in GitHub Desktop.
Add PMPro email shortcode !!wpml_pmpro_custom_email_template!! to change email content based on language
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
function my_pmpro_email_data($data, $email) | |
{ | |
if(ICL_LANGUAGE_CODE == "fr") | |
$data['wpml_pmpro_custom_email_template'] = "This is French"; | |
elseif(ICL_LANGUAGE_CODE == "en") | |
$data['wpml_pmpro_custom_email_template'] = "This is English"; | |
return $data; | |
} | |
add_filter("pmpro_email_data", "my_pmpro_email_data", 10, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment