[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

    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.


  • Strategerizer

    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.


  • Aaron

    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.