Created
April 12, 2021 07:47
-
-
Save andrewlimaza/f43c9acccdf96d53edfa31d9426af014 to your computer and use it in GitHub Desktop.
Change Expiration Text From "---" to "Until Cancelled"
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 | |
/** | |
* Change the account page expiration text to "Until Cancelled" | |
* for never expiring levels/members. | |
* Add this code to your site by following this guide - https://www.paidmembershipspro.com/create-a-plugin-for-pmpro-customizations/ | |
*/ | |
function my_adjust_expiration_text( $expiration_text, $level ) { | |
if ( $expiration_text === '---' ) { | |
$expiration_text = __( 'Until Cancelled', 'paid-memberships-pro' ); | |
} | |
return $expiration_text; | |
} | |
add_filter( 'pmpro_account_membership_expiration_text', 'my_adjust_expiration_text', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment