latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Keep CCAP at EOT

Home Forums Community Forum Keep CCAP at EOT

This topic contains 4 replies, has 4 voices. Last updated by  Jason k 4 years, 5 months ago.

Topic Author Topic
Posted: Sunday Feb 19th, 2012 at 6:59 pm #5665

Hi All,

I was wondering if there is any modification that will allow custom capabilities to remain intact at the EOT.

For example, I have a site that has a monthly access fee for most content – with videos being purchased separately.

If a user purchases a video, he/she should retain access to that for a lifetime. My thought was to accomplish this by using a level 1 subscription to give access to all non-video content, with ccap for access to the individual video posts.

The issue arises if the user were to let his membership lapse. While he/she would no longer have access to the non-video content, he/she should retain access to the videos. I feel this could be accomplished by an EOT demoting to a level 0, but how would I keep S2 from removing the ccap?

Suggestions?

Thanks in advance for your help!

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Tuesday Feb 21st, 2012 at 11:05 am #5871
David Welch
Username: dwbiz05

Looking at the code, I don’t see any “push-button” way to do this.

There is no filter or hook that you can use to stop it either… mostly because that’s not the way most people want it to work. :)

However, you could probably create a function to hook into the auto_eot process before it starts, store the ccap options in a new variable, then run another function after the eot process that adds the ccaps back to the user.

should be simple… :) lol!

Dave

Posted: Friday May 25th, 2012 at 7:14 pm #14644
Monte Goulding
Username: monte

Hmm… Did anyone work this out? I’m interested to add a lifetime ccap to users that might EOT and then buy more time later. It’s weird that it’s a lifetime ccap but doesn’t handle this scenario. Maybe I’ll need to change my plans and use a membership level at a lower price…

Posted: Sunday Jul 29th, 2012 at 3:46 am #20582
Jason k
Username: kstyles662

Hey David,

Did you find a hook/filter to allow for running specific code before eot process starts or during eot before it checks the eot time?

I am interested as i need to dynamically check some other things, and update users eot if needed, right before the eot time field is checked by the eot process

Thanks,
Jason K.

Posted: Monday Jul 30th, 2012 at 8:32 pm #20726
Jason k
Username: kstyles662

would something like this work for trying to update things right before the eot system ran everytime?

if so another question arises, does this run before the eot system starts as a whole or before each users eot time is evaluated?

because if is latter of the two then i would want to make sure the code only did things per user and not all users everytime each user was checked.

add_action("ws_plugin__s2member_before_auto_eot_system", "custom_update_some_info");
function custom_update_some_info(){
     //do some stuff and calculations and update certain users eot time in their user meta
}
Viewing 4 replies - 1 through 4 (of 4 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.