Last active
October 12, 2020 14:44
-
-
Save andrewlimaza/99348407e99514f72d08e59dd5bad14b to your computer and use it in GitHub Desktop.
change pmpro account text with gettext filter
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 | |
//copy lines 5 onwards into your PMPro customizations plugin - http://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
add_filter( 'gettext', 'change_my_pmpro_account_text', 20, 3 ); | |
/** | |
* Change words for pmpro account page | |
* | |
* @link http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext | |
*/ | |
function change_my_pmpro_account_text( $translated_text, $text, $domain ) { | |
switch ( $translated_text ) { | |
case 'Level' : | |
$translated_text = __( 'Membership Status', 'paid-memberships-pro' ); | |
break; | |
case 'Billing' : | |
$translated_text = __( 'Billing Information', 'paid-memberships-pro' ); | |
break; | |
case 'Change' : | |
$translated_text = __( 'Change / Renew Membership', '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