Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kimwhite/6c4a5fcc44513bdb16cf4c06fcc3f4ff to your computer and use it in GitHub Desktop.
Save kimwhite/6c4a5fcc44513bdb16cf4c06fcc3f4ff to your computer and use it in GitHub Desktop.
Change wording in PMPro MailChimp Opt In Box
<?php // do not copy this line.
/**
* This recipe will Change wording in PMPro MailChimp Opt In Box
* Change the $translated_text = lines to the text you want.
*
* You can add this recipe to your site by creating a custom plugin
* or using the Code Snippets plugin available for free in the WordPress repository.
* Read this companion article for step-by-step directions on either method.
* https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
function my_gettext_pmpro_mailchimp($translated_text, $text, $domain)
{
if ($domain == "pmpro-mailchimp") {
switch ($text) {
case "Opt-In Mailing List":
$translated_text = "Our List";
break;
case "Join one or more of our mailing lists.":
$translated_text = "Join one or more of our newsletters.";
break;
case "Join our mailing list.":
$translated_text = "Join our newsletter list.";
break;
}
}
return $translated_text;
}
add_filter('gettext', 'my_gettext_pmpro_mailchimp', 10, 3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment