Created
May 21, 2020 21:15
-
-
Save femiyb/ab74552203340c9ab898af879b96ae16 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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 'The price for membership is <strong>%s</strong> now' : | |
$translated_text = __( 'The total price is %s today', 'paid-memberships-pro' ); | |
break; | |
case 'You have selected the <strong>%s</strong> membership level.' : | |
$translated_text = __( 'You are purchasing the <strong>%s</strong> membership level.', '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