Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save strangerstudios/6e4ee6f16e3ab8e5734f010496720b87 to your computer and use it in GitHub Desktop.
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.
/*
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