Created
May 20, 2019 20:33
-
-
Save LMNTL/aad79bd641f9dade4de7c0dbf5f8822c to your computer and use it in GitHub Desktop.
Always show renew links for certain PMPro levels if the member already has that level.
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
// 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