Last active
April 16, 2021 23:46
-
-
Save kimcoleman/e1693dffac585f9651517e5840aa1b49 to your computer and use it in GitHub Desktop.
Remove or change the level cost for free levels.
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
<?php | |
/** | |
* Remove or change the level cost for free levels. | |
*/ | |
function free_level_change_pmpro_level_cost_text( $text, $level ) { | |
if ( pmpro_isLevelFree( $level ) ) { | |
return ''; | |
} else { | |
return $text; | |
} | |
} | |
add_filter( 'pmpro_level_cost_text', 'free_level_change_pmpro_level_cost_text', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This recipe is included in the blog post on "Remove or Change “The price for membership is $0.00 now” for Free Membership Levels" at Paid Memberships Pro here: https://www.paidmembershipspro.com/remove-or-change-the-price-for-membership-is-0-00-now-for-free-membership-levels/