Skip to content

Commit

Permalink
we want the next payment date to stay the same on downgrades too
Browse files Browse the repository at this point in the history
  • Loading branch information
ideadude committed Jun 2, 2020
1 parent e1fa351 commit 752f69d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pmpro-proration.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,10 @@ function pmprorate_pmpro_checkout_level( $level ) {
*/
$level->initial_payment = 0;
global $pmpro_checkout_old_level;
$pmpro_checkout_old_level = $clevel;
$pmpro_checkout_old_level = $clevel;

//make sure payment date stays the same
add_filter( 'pmpro_profile_start_date', 'pmprorate_set_startdate_to_next_payment_date', 10, 2 );
} elseif( pmprorate_have_same_payment_period( $clevel->id, $level->id ) ) {
/*
Upgrade with same billing period in a nutshell:
Expand Down

0 comments on commit 752f69d

Please sign in to comment.