Subscription expiry date and ACTIVE/EXPIRED flag

  • Chris Jarvis
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
7 years 5 days ago #96242 by Chris Jarvis
Hello

I am just wondering if anyone can tell me how the Subscription Expiry Date and the ACTIVE/EXPIRED flag work together please.

I've noticed that if an Expiry Date is in the future then quite rightly the status flag shows ACTIVE and once that date passes then the flag auto updates to EXPIRED which is great

I am just wanting to know the behaviour through the administrator part of our website if we manually change one or the other field which is the lead field if that makes sense

So say if we have a subscription that expires in the future but we change that to a date in the past and click Save or Apply, does the Status flag Auto Switch to EXPIRED without having to change it?

Or do we need to make sure we change it in both places?
If we have a date that has past and someone manually changes the expiry date to the future does the flag auto switch from EXPIRED to ACTIVE?

I'm trying to train staff into what to do if they manual change records and want to keep this as tight and accurate as possible.

I think i have noticed that if you have a date in the future but decide to change the status from ACTIVE to EXPIRED it remains expired. I have only just seen this through testing though and I wondered if anyone could help and confirm the logic and behaviour between these 2 fields please?

We have a record that we use for test that has an expiry date in the future 31/01/2018 but a status of EXPIRED.

If that is a manual change I can understand that but I don't want it to be a bug in the extension if that makes sense.
Any help would be great as I really just want to understand how to work this great extension in different situations and the best way to do that

Thanks

Please Log in or Create an account to join the conversation.

More
7 years 5 days ago #96267 by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Subscription expiry date and ACTIVE/EXPIRED flag
Hello

The process which update status of a subscription record from Active to Expired base on it's subscription end date is handled by a system plugin. That system plugin runs every 2 hours (assume that there are people access to your site using that 2 hours, if not, maybe longer, until there is someone access to your site)

That plugin check if there is a subscription record has end date smaller than current date, if so, it update status of the record to expired, trigger onMembershipExpired event to allow plugin to do other tasks if needed (for example, remove users from Joomla groups...)

Base on that principle:

1. If you edit a record, change the subscription end date to a pass date without changing the Subscription Status, it might not be expired automatically. But it will become expired in less than 2 hours. Of course, you can change Subscription Status to Expired when changing the date, I think it is recommended process

2. if you just change a subscription record end date to a future date, it won't become active automatically. So in that case, you need to both change the date and change subscription status to Active

Hope my answers are clear to you

Regards

Tuan

Please Log in or Create an account to join the conversation.