Page 1 of 1

Total paid registration time minus lapsed periods?

PostPosted: July 11th, 2011, 7:58 pm
by PseudoNyhm
I see that s2member_paid_registration_time() and associated constants give time since a paid level was first achieved. This is documented as being set once and never changing.

  1. Is this unchanging even if the user is demoted (such as when a subscription is canceled), then promoted again (upon resuming subscription)?
  2. If so, is there any way to get the total cumulative time at a paid level minus any lapses. For example, suppose a user is Level 1 for a month, then doesn't pay for 3 months (during which time s2Member demotes the user to Level 0), then resumes subscription (back to Level 1). Their paid registration time would be reported as 4 months.

This is important for content dripping. If a user comes back to the service after a long gap, they would instantly get all the content they would have had if they had kept paying all along. My service will have a membership time component, so I want to make sure I understand how this behaves in the long term.

One workaround is to configure s2Member to delete an account upon demotion to Level 0, but that's more drastic than I'd like.

Re: Total paid registration time minus lapsed periods?

PostPosted: July 11th, 2011, 8:36 pm
by Cristián Lávaque
I don't think there's a way to get the total time at each level yet. Content dripping is something that's being currently worked on and improved.

You could probably create a custom script to monitor account creation/modification and keep your own log of the roles and times somewhere in the database. This thread may help with the hooks you can use for that viewtopic.php?f=4&t=10414

I hope that helps. :)

Re: Total paid registration time minus lapsed periods?

PostPosted: July 13th, 2011, 3:09 pm
by Jason Caldwell
Is this unchanging even if the user is demoted (such as when a subscription is canceled), then promoted again (upon resuming subscription)?

Yes, it is preserved, even if the Member is demoted.
However, you can change this behavior if you need to.

Create this directory and file:
/wp-content/mu-plugins/s2-hacks.php
Code: Select all
<?php
add_filter
("ws_plugin__s2member_preserve_paid_registration_times", "__return_false");
?>

If so, is there any way to get the total cumulative time at a paid level minus any lapses. For example, suppose a user is Level 1 for a month, then doesn't pay for 3 months (during which time s2Member demotes the user to Level 0), then resumes subscription (back to Level 1). Their paid registration time would be reported as 4 months.
Sorry, nothing like that yet. Thanks for the great suggestion though, I'll see what we can do. As Cristián mentioned, we are working to improve this aspect of s2Member, and there are plans to create additional options for s2Member Pro Customers.