February 4, 2019 at 11:38 pm #15301
Based on what I can tell, the “Auto Upgrade” feature should only work for “active” or “unsubscribed” account states, right?
Because that is not what seems to be happening for me.
I have membership level 2 that should auto upgrade to level 3 after two days.
The upgrade works fine, but the problem is it works fine regardless of the account state, including Expired users.
When an ‘expired’ user logs in, they change levels but the status remains ‘expired’.
I checked around line 38 on “emember_scheduled_membership_upgrade.php” and it doesn’t seem to have any effect – (I tried changing account states to test, for example changed ‘active’ to ‘pending’ and then trying with an active member, and they still get upgraded)
Am I missing a setting or something about how it’s supposed to work? I understand the ‘upgrade start date’, it’s not an issue with that.February 5, 2019 at 2:28 am #79158adminKeymaster
yes, it is only suppose to do the auto upgrade if the account status is “active” or “unsubscribed”. The expired user’s account shouldn’t be auto-upgrade. They can’t view the content anyway so even if it does, there is no issue. However, there is a check that should prevent expired account from looked at (when the auto-upgrade daily cronjob is executed).
Can you please enable the debug option in the plugin to see if the auto upgrade process is the one doing this (and not any other customization). Have you done any customization?February 6, 2019 at 12:44 am #79159
Possibly I didn’t wait long enough for the daily cron to fully run, I have turned on debug and set auto upgrade to 1 day to test so I’ll give it another day+ to run to see the outcome.
Regarding customization, I did remove the && $member->account_state != ‘unsubscribed’
from emember scheduled upgrade account state check, because I do not want unsubscribed to be auto upgraded, only the active status.
What I am trying to achieve is:
User signs up to site for trial membership level 1, which has is valid for X numbers of days. Lets say 7.
Then around day 7 one of two things should happen:
1. If user did not cancel subscription within the 7 days (which is made thru payment gateway ccbill) then are still ‘active’ status and get auto upgraded to membership level 2.
2. If user cancelled subscription within the 7 days, then they have been set to status ‘unsubscribed’ by ccbill and around day 7 they should be changed to ‘expired’ because the subscription length has run out.
So basically after 7 days, there would be no such thing as an ‘active’ user on level 1, they would be changed to one of the two above scenarios.
I wasn’t sure if having the membership level 1 “subscription duration” set as the same numbers of days as “auto upgrade” for that level was causing an issue or if one or the other should have an extra day.
I’ll wait for the cronjob to fully run and update with what happens.February 7, 2019 at 1:04 am #79160adminKeymaster
The change you made should be fine. Let the full cronjob run then check the cronjob log file so we can see what it is doing.February 7, 2019 at 3:26 am #79161
OK I let it run twice and it worked as expected now for scenario 1. It only upgraded the test account I had as ‘active’ and not the others I tested that were ‘unsubscribed’ or ‘inactive’.
For scenario 2, it still doesn’t change status from ‘unsubscribed’ after the expiration date, from what I can tell that is how your plugin has it designed so I will follow up via E-mail about a customization.
- You must be logged in to reply to this topic.