Created
April 23, 2019 19:25
-
-
Save LMNTL/d9ea45fe305416405997043385d0fd4d to your computer and use it in GitHub Desktop.
override expiration text for Set Expiration Date Add On for Paid Memberships Pro
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
/* | |
Change expiration text on levels page. | |
*/ | |
function pmprosed_my_pmpro_level_expiration_text($expiration_text, $level) | |
{ | |
$set_expiration_date = pmpro_getSetExpirationDate($level->id); | |
if (!empty($set_expiration_date)) { | |
$set_expiration_date = pmprosed_fixDate($set_expiration_date); | |
$expiration_text = "This membership level will expire on " . date(get_option('date_format'), strtotime($set_expiration_date, current_time('timestamp'))) . "."; | |
} | |
return $expiration_text; | |
} | |
add_filter('pmpro_level_expiration_text', 'pmprosed_my_pmpro_level_expiration_text', 20, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment