[Pro Sites] What happens when user on one subscription purchases something different?

What happens to the user’s current subscription if they upgrade, downgrade or just change the subscription frequency? Are those passed on to PayPal so the existing subscription gets terminated and another one started? Or the price of their subscription changes but their due dates remain the same?

I assume user does not get credit for any unused time on their previous subscription, or do they?

Is the underlying plugin logic documented anywhere for this type of scenarios?


  • DavidM
    • DEV MAN’s Mascot

    Hi Strategerizer,

    Sorry for the delayed response here. I took a moment to see how this is done through the code and there’s a rather complex upgrade calculation (done via the calc_upgrad() function in pro-sites.php) and basically it pro-rates the time for upgrades.

    What I understand happens is that the plugin automatically upgrades the site to the new level upon purchasing the upgrade. And I believe it adjusts the expiration date per that calculation (calc_upgrade() ) and cancels the existing subscription in Paypal while creating a new one with the upgrade level price, set to be charged once the existing one expires.

    I’ll ask the lead developer to confirm that’s the case but I believe that’s how it works.



  • Mason
    • DEV MAN’s Sidekick


    Since there is no way to upgrade or downgrade a subscription through paypal the old subscription is canceled and a new subscription is created. The difference is calculated automatically by the plugin and the date of their next payment is adjusted to take into account any balance from the previous subscription.

    Does that help?

  • Strategerizer
    • Site Builder, Child of Zeus

    Sounds great. So let me make sure I get this right as I think it can get tricky if credits back to customers happen when they downgrade…

    Let’s assume my site has a $10 and a $30 subscription plans. In the middle of the pay period the customer moves from $10 to $30.

    Then the system will charge first period for $25 ($30 – $5 of unused time from old subscription) and then keep charging $20 from then on?

    And for reverse scenario, if customer is moving from $30 plan to $10 plan, halfway through the period… The system will credit $15 for first payment, so will take $5 from my account and give credit to customer and then keep charging them $10 per period?

    I just need to be able to explain to customers what happens in different scenarios. Also, if the system does do crediting, I will need to make sure there are funds always in the account to cover such scenarios.


  • Strategerizer
    • Site Builder, Child of Zeus

    Or, since giving money back to customer account may be tricky, whatever credit they get by downgrading will be subtracted from their payments (be it only the first one of the new subscription or be it over several pay periods) until that credit gets exhausted?

  • Aaron
    • CTO

    We definitely need to add this to the documentation as it’s a bit tricky. We covered it in the beta threads but here’s a summary:

    Change payment term – cancels prev subscription and creates a new one starting on old next payment date. No credits or anything complicated here.

    Downgrade – basically same as changing the term. Creates new sub at lower rate. Their level will drop when the next scheduled payment (lesser) comes through.

    Upgrade – Here’s the toughy. Mason was right here: The difference is calculated automatically by the plugin and the date of their next payment is adjusted to take into account any balance from the previous subscription. This is because when upgrading you want them to immediately have access to the higher level.

  • Strategerizer
    • Site Builder, Child of Zeus

    Thanks for the clarification; makes perfect sense.

    I also like the approach of extending the time until new subscription payment is charged so they get credited that way, without having to modify the subscription amount at any point – very smart!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.