Created
December 28, 2014 20:23
-
-
Save strangerstudios/91b351dc0e37b2ca8946 to your computer and use it in GitHub Desktop.
$25 discount when renewing the same level in Paid Memberships Pro
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
function my_pmpro_checkout_level_renewal_pricing($level) | |
{ | |
$discount = 25; //change this | |
if(pmpro_hasMembershipLevel($level->id)) //might want to check for specific levels here | |
$level->initial_payment = max(0, $level->initial_payment - $discount); | |
return $level; | |
} | |
add_filter('pmpro_checkout_level', 'my_pmpro_checkout_level_renewal_pricing'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment