Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michaelbeil/abdafcde61052dfe700dec44e43e4c71 to your computer and use it in GitHub Desktop.
Save michaelbeil/abdafcde61052dfe700dec44e43e4c71 to your computer and use it in GitHub Desktop.
gettext change 'state' to 'Province'
<?php
//copy lines 5 onwards into your 'PMPro Customizations' plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
function pmproc_change_my_text( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case 'State' :
$translated_text = __( 'Region', 'paid-memberships-pro' );
break;
}
return $translated_text;
}
add_filter( 'gettext', 'pmproc_change_my_text', 20, 3 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment