Created
September 13, 2017 14:21
-
-
Save strangerstudios/6e4ee6f16e3ab8e5734f010496720b87 to your computer and use it in GitHub Desktop.
Show a renew link instead of Your Level for recurring subscriptions on the levels page with 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
/* | |
Show a renew link instead of Your Level | |
for recurring subscriptions on the levels page. | |
Add this code to a custom plugin. | |
*/ | |
function pmpro_is_level_expiring_soon_yes_on_levels_page($expiring) { | |
//only adjust this on the levels page so we don't mess anything up | |
global $pmpro_pages; | |
if(!is_admin() && !empty($pmpro_pages) && is_page($pmpro_pages['levels'])) | |
$expiring = true; | |
return $expiring; | |
} | |
add_action('pmpro_is_level_expiring_soon', 'pmpro_is_level_expiring_soon_yes_on_levels_page'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment