Created
March 23, 2021 14:04
-
-
Save ideadude/d447944829c74fe6923dbdd9ab9a8852 to your computer and use it in GitHub Desktop.
Change the confirmation text when using PMPro and the Email Confirmation Add On.
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
/** | |
* Change the "IMPORTANT!" confirmation text when using PMPro and the Email Confirmation Add On. | |
* Add this code into a custom plugin or code snippet. | |
* Be sure to change the translated lines below to the language and words you want. | |
* https://www.paidmembershipspro.com/how-to-add-code-to-wordpress/ | |
*/ | |
function my_pmpro_email_confirmation_text( $translated_text, $text, $domain ) { | |
// Ignore strings for other plugins. | |
if ( $domain != 'pmpro-email-confirmation' ) { | |
return $translated_text; | |
} | |
// Message used in the email. | |
if ( $text == 'IMPORTANT! You must follow this link to confirm your email address before your membership is fully activated' ) { | |
$translated_text = "IMPORTANT! Vous devez suivre ce lien pour confirmer votre adresse e-mail avant que votre abonnement ne soit entièrement activé"; | |
} | |
// Slightly different message added to non-member content messages. | |
if ( $text == 'Important! You must click on the confirmation URL sent to %s before you gain full access to your membership' ) { | |
$translated_text = 'Important! Vous devez cliquer sur l'URL de confirmation envoyée à %s avant d'obtenir un accès complet à votre adhésion'; | |
} | |
return $translated_text; | |
} | |
add_filter( 'gettext', 'my_pmpro_email_confirmation_text', 20, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment