Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save femiyb/91de6162e3c71584994e9b8e6257a97b to your computer and use it in GitHub Desktop.
Save femiyb/91de6162e3c71584994e9b8e6257a97b to your computer and use it in GitHub Desktop.
Always show renew links for certain PMPro levels if the member already has that level.
// always show renew links for certain levels if the member already has that level.
function my_pmpro_always_show_renew_levels( $show, $level ){
/*--- change this line to the levels you want to show a renew link---*/
$show_levels = array( 1, 2 );
if( in_array( $level->id, $show_levels ) ) {
$show = true;
}
return $show;
}
add_filter( 'pmpro_is_level_expiring_soon', 'my_pmpro_always_show_renew_levels', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment