Skip to content

Instantly share code, notes, and snippets.

@strangerstudios
Created December 27, 2013 18:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strangerstudios/8150762 to your computer and use it in GitHub Desktop.
Save strangerstudios/8150762 to your computer and use it in GitHub Desktop.
Nicer level costs example. Add this to your active theme's functions.php or a custom plugin.
/*
Nicer level costs.
*/
function nicer_pmpro_level_cost_text($text, $level)
{
global $pmpro_currency_symbol;
if(pmpro_isLevelFree($level))
$text = "Membership is free.";
elseif($level->initial_payment == $level->billing_amount)
$text = $pmpro_currency_symbol . $level->initial_payment . "/" . $level->cycle_period;
return $text;
}
add_filter("pmpro_level_cost_text", "nicer_pmpro_level_cost_text", 15, 2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment