Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save strangerstudios/91b351dc0e37b2ca8946 to your computer and use it in GitHub Desktop.
Save strangerstudios/91b351dc0e37b2ca8946 to your computer and use it in GitHub Desktop.
$25 discount when renewing the same level in Paid Memberships Pro
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