Skip to content

Instantly share code, notes, and snippets.

@kimcoleman
Last active April 16, 2021 23:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimcoleman/e1693dffac585f9651517e5840aa1b49 to your computer and use it in GitHub Desktop.
Save kimcoleman/e1693dffac585f9651517e5840aa1b49 to your computer and use it in GitHub Desktop.
Remove or change the level cost for free levels.
<?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 );
@laurenhagan0306
Copy link

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/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment