Skip to content

Instantly share code, notes, and snippets.

@MaryOJob
Last active November 9, 2021 11:50
Show Gist options
  • Save MaryOJob/a4bea730f2ea2cf3115e71dec66f98ff to your computer and use it in GitHub Desktop.
Save MaryOJob/a4bea730f2ea2cf3115e71dec66f98ff to your computer and use it in GitHub Desktop.
Replace "Email Address" with "Username or Email Address" on PMPro Login Form
<?php // Do not copy this line please. Copy from below.
/**
* This filter will search your codebase for translatable strings and replace when an exact match is found.
* Replace "Email Address" with "Username or Email Address" on PMPro Login Form
* Add this code to your PMPro Customizations Plugin: https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
*/
add_filter( 'gettext', 'register_text' );
function register_text( $translating ) {
$translated = str_ireplace( 'Username or Email Address', 'Username', $translating );
return $translated;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment