Skip to content

Instantly share code, notes, and snippets.

@greathmaster
Created October 14, 2015 16:44
Show Gist options
  • Save greathmaster/c7a169825e79bbbb2e9f to your computer and use it in GitHub Desktop.
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
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