Created
December 27, 2013 18:28
-
-
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.
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
/* | |
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