How it Works

When a member chooses to downgrade, the initial payment is set to $0 and they are downgraded to the newly selected level immediately. The member’s existing recurring payment date remains the same. When the next recurring payment is due, the member will be charged for the level they downgraded to.

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 prorated 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

CaseDay of Billing CycleAmount Charged
Member Upgrades from $5/mo. plan to $10/mo. planDay 15 (1/2 into cycle)$2.50
Member Upgrades from $250/yr. plan to $500/yr. planMonth 3 (1/4 into cycle)$187.50
Member Downgrades from $10/mo. plan to $5/mo. planDay 15 (1/2 into cycle)$0.00*
Member Downgrades from $500/yr. plan to $250/yr. planMonth 3 (1/4 into cycle)$0.00*
Member Upgrade from $10/mo. plan to $200/yr. planDay 1 (0 days into cycle)$190**
Member Upgrade from $10/mo. plan to $200/yr. planDay 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.

Installation

You must have the Paid Memberships Pro plugin installed and activated with a valid license type to use this Add On.

  1. Navigate to Memberships > Add Ons in the WordPress admin.
  2. Locate the Add On and click Install Now.
    • To install this plugin manually, download the .zip file above, then upload the compressed directory via the Plugins > Add New > Upload Plugin screen in the WordPress admin.
  3. Activate the plugin through the Plugins screen in the WordPress admin.

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 We Calculate the Prorated Amount (Technical Info)

The Proration 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.

apply_filters( '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:


apply_filters( '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:

Limitations

Here we will collect known limitations and conflicts the proration Add On has.

  • The Proration Add On will only prorate a membership level change from one recurring membership to another recurring membership. This Add On does not prorate changes between fixed term membership levels.
  • The plugin has no way to apply a credit in cases where the calculated prorated 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 following Add Ons:
    1. Gift Membership
    2. Multiple Memberships Per User (MMPU)

This is a Plus Add On.

Plus Add Ons are included in all Plus or higher premium membership plans.