Skip to content

Instantly share code, notes, and snippets.

@andrewlimaza
Last active August 4, 2022 19:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save andrewlimaza/8f1c84a0eba4ce0a5edf7e348ad22fb3 to your computer and use it in GitHub Desktop.
Save andrewlimaza/8f1c84a0eba4ce0a5edf7e348ad22fb3 to your computer and use it in GitHub Desktop.
gettext change level cost 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_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;
}
@andrewlimaza
Copy link
Author

Update, to adjust the membership price text. Please use https://www.paidmembershipspro.com/add-ons/pmpro-custom-level-cost-text/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment