Forked from LMNTL/my_pmpro_always_show_renew_levels.php
Created
July 30, 2020 21:11
-
-
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.
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
// 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