So sorry, there's really no Hook/Filter available in this regard yet. The hack I posted above would need to be done through a direct edit of s2Member's source code in this case. So, not really a way to future proof this modification. Although a future release will include this functionality, so you shouldn't need the hack in the future. See also this article on the best ways to hack s2Member: viewforum.php?f=40#src_doc_overview_descriptionkennymcnett wrote:
Jason, this is working wonderfully. What's the best way for me to future-proof it against updates? I'm already faced with wanting to update to the latest version (for the download counts--very excited about those!!), but I'll lose this change and have to re-make it each time I update.
Statistics: Posted by Jason Caldwell — November 3rd, 2011, 12:16 pm
foreach ($user->allcaps as $cap => $cap_enabled)
if (preg_match ("/^access_s2member_ccap_/", $cap))
$user->remove_cap ($ccap = $cap);
#foreach ($user->allcaps as $cap => $cap_enabled)
#if (preg_match ("/^access_s2member_ccap_/", $cap))
#$user->remove_cap ($ccap = $cap);
Statistics: Posted by Jason Caldwell — October 25th, 2011, 5:37 pm
Statistics: Posted by kennymcnett — October 24th, 2011, 1:58 pm
Statistics: Posted by Jason Caldwell — October 22nd, 2011, 5:04 pm
Statistics: Posted by kennymcnett — October 21st, 2011, 6:29 pm
With s2Member, you can sell one or more Custom Capabilities using Buy Now functionality, to "existing" Users/Members, regardless of which Membership Level they have on your site ( i.e. you could even sell Independent Custom Capabilities to Users at Membership Level #0, normally referred to as Free Subscribers, if you like ). So this is quite flexible.
Independent Custom Capabilities do NOT rely on any specific Membership Level. That's why s2Member refers to these as `Independent` Custom Capabilities, because you can sell Capabilities this way, through Buy Now functionality, and the Customer's Membership Level Access, along with any existing paid Subscription they may already have with you, will remain completely unaffected. That being said, if you intend to charge a recurring fee for Custom Capabilities, please use a Subscr. Modification Button instead; because Independent Custom Capabilities can only be sold through Buy Now functionality.
Independent Custom Capabilities are added to a Customer's account immediately after checkout, and the Customer will have the Custom Capabilities for as long as their Membership lasts, based on their primary Subscription with your site, and/or forever, if they have a Lifetime account with you.
In other words, Independent Custom Capabilities will exist on the Customer's account forever, or until an EOT ( End Of Term ) occurs on their primary Subscription with you; in which case s2Member would demote or delete the Customer's account ( based on your EOT configuration ), and all Custom Capabilities are removed as well.
Statistics: Posted by Jason Caldwell — October 21st, 2011, 5:42 pm
Statistics: Posted by Eduan — October 21st, 2011, 2:13 pm
Statistics: Posted by kennymcnett — October 21st, 2011, 2:01 pm
Statistics: Posted by Eduan — October 20th, 2011, 11:01 pm
Statistics: Posted by kennymcnett — October 20th, 2011, 5:05 pm