Skip to content

Instantly share code, notes, and snippets.

@michaelbeil
Forked from kimwhite/change_my_text_example.php
Last active December 29, 2022 00:01
Show Gist options
  • Save michaelbeil/b3e4d729440e8fcadd8945ffa2f44fc2 to your computer and use it in GitHub Desktop.
Save michaelbeil/b3e4d729440e8fcadd8945ffa2f44fc2 to your computer and use it in GitHub Desktop.
Change text
<?php
// Add this code below to your PMPro Customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/
add_filter( 'gettext', 'change_my_text_example', 20, 3 );
/**
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext
*/
function change_my_text_example( $translated_text, $text, $domain ) {
switch ( $translated_text ) {
case "Tax" :
$translated_text = __( 'GST', 'paid-memberships-pro' );
break;
}
return $translated_text;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment