Last active
August 4, 2022 19:02
-
-
Save andrewlimaza/8f1c84a0eba4ce0a5edf7e348ad22fb3 to your computer and use it in GitHub Desktop.
gettext change level cost text
This file contains 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_cost_example', 20, 3 ); | |
/** | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
*/ | |
function change_my_cost_example( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'The price for membership is <strong>%s</strong> now' : | |
$translated_text = __( 'The price for membership is <strong>%s</strong> today.', 'paid-memberships-pro' ); | |
break; | |
case 'and then <strong>%s after %d %s</strong>' : | |
$translated_text = __( 'After your 365 day FREE listing only $15.00 per month.', '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
Update, to adjust the membership price text. Please use https://www.paidmembershipspro.com/add-ons/pmpro-custom-level-cost-text/