Skip to content

Instantly share code, notes, and snippets.

@dparker1005
Created June 13, 2019 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dparker1005/20e8a0b6933cb0763798c51a5e9d9d75 to your computer and use it in GitHub Desktop.
Save dparker1005/20e8a0b6933cb0763798c51a5e9d9d75 to your computer and use it in GitHub Desktop.
Updated snippet from user which changes 'Account Management' to 'Password Management' on a user's WordPress profile in addition to the snippet's original functionality.
<?php
function my_gettext_membership( $output_text, $input_text, $domain ) {
global $pagenow;
if ( ! is_admin() && 'pmproarc' === $domain ) {
$output_text = preg_replace( '/Yes, renew at.+$/', 'Allow recurring payments using PayPal', $output_text );
}
if ( 'profile.php' === $pagenow ) {
$output_text = str_replace( 'Account Management', 'Password Management', $output_text );
}
return $output_text;
}
add_filter( 'gettext', 'my_gettext_membership', 10, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment