How it Works
When a member chooses to downgrade, the initial payment is set to $0 and the downgrade is delayed until the next payment date. The member’s current recurring payment date remains the same. On the day of their next recurring payment, the add on will change their membership level to the lower level.
Downgrades are defined as having an initial payment less than the current level, but can be altered via the pmpro_is_downgrade filter. It assumes that the level’s initial payment is equal to billing amount.
When a member chooses to upgrade to a level with the same billing period settings, they are charged a pro-rated amount at checkout based on the number of days left in the current payment period and prices of the old and new level. The member’s recurring payment date remains the same, and the subscription is changed to charge the new amount.
When a member chooses to upgrade to a level with different billing period settings, they are charged the initial payment of the new level minus a credit based on how many days are left in their current payment period and the subtotal from their last order. The member’s recurring payment date is reset to be one (new level) payment period from the date of checkout.
Sample Proration Cases Covered by this Add On
|Case||Day of Billing Cycle||Amount Charged|
|Member Upgrades from $5/mo. plan to $10/mo. plan||Day 15 (1/2 into cycle)||$2.50|
|Member Upgrades from $250/yr. plan to $500/yr. plan||Month 3 (1/4 into cycle)||$312.50|
|Member Downgrades from $10/mo. plan to $5/mo. plan||Day 15 (1/2 into cycle)||$0.00*|
|Member Downgrades from $500/yr. plan to $250/yr. plan||Month 3 (1/4 into cycle)||$0.00*|
|Member Upgrade from $10/mo. plan to $200/yr. plan||Day 1 (0 days into cycle)||$190**|
|Member Upgrade from $10/mo. plan to $200/yr. plan||Day 15 (1/2 into cycle)||$195**|
* Sometimes the calculation results in a negative amount but the system currently has no way to do a credit. In the cases above there could have been a $2.50 credit or $312.50 credit.
** When upgrading to a level with a different billing period, the recurring payment date is reset to one (new level) payment period from the date of checkout.
- PMPro Plus members can install the add on via their WordPress dashboard under Memberships > Add Ons.
- Or, download the plugin .zip file and upload the ‘pmpro-proration’ folder to the ‘/wp-content/plugins/’ directory.
- Activate the plugin through the ‘Plugins’ menu in WordPress.
Some background on proration.
By default, Paid Memberships Pro does not calculate prorated payments. We made this decision because we found that different sites typically require different proration rules. With this add on, we’ve tried to implement the most common rules, while allowing for further customization through custom code.
How It Calculates the Prorated Amount (for those technical folks)
The add on uses different rules depending on if the new level has the same payment period (e.g. monthly to monthly) or a different payment period (e.g. monthly to annual).
Same Payment Period
The system considers two factors:
- (a) What they should pay to have the new level for the remaining days in the current period = $level->billing_amount * $per_left.
- (b) What they should have paid for days they’ve had the current level this payment period = $clevel->billing_amount * $per_passed.
The user is charged what they need to pay = (a) + (b) – (what they already paid on the last order).
In this case, we also hook into pmpro_profile_start_date to make sure the user’s recurring payments happen on the same dates they were meant to. In practice, the day may adjust by one or two days to account for months with different numbers of days.
Different Payment Period
A credit is calculated based on the subtotal from their last order * the % of time left in their current payment period.
The user is charged the (initial payment of the new level) – (the credit amount)
In this case, we DO NOT tweak the pmpro_profile_start_date. The new subscription is setup by default to renew one (new level) payment period from the date of checkout.
Changing the Default Behavior with Custom Code
The plugin contains some WordPress filters to adjust the behavior of the code.
pmpro_is_downgrade( $is_downgrade, $old_level, $new_level), return true if the new level is a downgrade from the old level
Example code to explicitly state which levels are downgrades:
pmpro_have_same_payment_period( $same_payment_period, $old_level, $new_level), return true if the new level has the same payment period as the old level
You generally don’t want to use this one, but you could override it to force the add on to apply a different proration rule set in certain cases.
You can also override the main checkout level filter to implement your own rules.
Example code to override the main checkout level filter:
Here we will collect known limitations and conflicts the proration add on has.
- The plugin has no way to apply a credit in cases where the calculated pro-rated amount is negative. This typically happens when downgrading.
- If a member upgrades twice within one pay period. Only the last payment will be considered when calculating the prorated amount due. This could be handled by summing the total of all orders within the pay period, but we have not used this method as it could also cause conflicts on sites that have multiple unrelated orders (when using Addon Packages or similar price-adjusting customizations). Additionally, payments on edge dates might be accidentally included or not included in the sum.
- This plugin is not currently compatible with the Multiple Memberships per User Add On.