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.

Question about CCAPs, recurring payment and +

Home Forums Community Forum Question about CCAPs, recurring payment and +

This topic contains 14 replies, has 3 voices. Last updated by  Cristián Lávaque 4 years, 2 months ago.

Topic Author Topic
Posted: Tuesday Oct 30th, 2012 at 5:20 pm #30214
cassel
Username: cassel

I have a few questions to help me direct how i can use s2Member more effectively on my site.

1- If some ccaps are associated with a recurring payment, and the user cancels the payments, i assume that the associated ccaps are also removed, right?

2- if a user had some ccaps from another purchase (not a recurring payment), and then purchases another ccap with a recurring payment, if the user cancels the payments, will he loose all the ccaps or only those associated with that particular recurring payment?

3- If i want to offer a recurring payment product (like a membership) with a “free to keep” product that would be like access to another ccap, is there a way to loose the ccap with cancellation of payment yet keep the “yours to keep anyway” gift?

List Of Topic Replies

Viewing 14 replies - 1 through 14 (of 14 total)
Author Replies
Author Replies
Posted: Wednesday Oct 31st, 2012 at 5:23 pm #30257
Raam Dev
Username: Raam
Staff Member

Hi cassel,

Yes, if someone is demoted, all Custom Capabilities will be removed. As per Dashboard -› s2Member® -› PayPal® Pro Forms -› Capability (Buy Now) Forms:

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.

If you don’t want that to happen, you can hack s2Member by commenting out the following lines in s2member/includes/classes/auto-eots.inc.php:

foreach ($user->allcaps as $cap => $cap_enabled) 
    if (preg_match ("/^access_s2member_ccap_/", $cap)) 
         $user->remove_cap ($ccap = $cap); 
Posted: Wednesday Oct 31st, 2012 at 5:32 pm #30260
cassel
Username: cassel

Do you mean ALL ccaps, or ALL those associated with the EOT (which were included in the Paypal button/pro-form)? See point #2.

  • This reply was modified 4 years, 2 months ago by  cassel.
Posted: Wednesday Oct 31st, 2012 at 7:07 pm #30287
Raam Dev
Username: Raam
Staff Member

ALL Custom Capabilities are removed upon demote, regardless of how they were added.

We understand this creates several limitations, so we’ve changed how this works in the next major release of the software.

Posted: Wednesday Oct 31st, 2012 at 7:11 pm #30288
cassel
Username: cassel

Oh boy…. something i between watch out then! thanks for the clarification.

If i am to comment out the lines you are indicating, what will it do? Remove NONE of the ccaps?

  • This reply was modified 4 years, 2 months ago by  cassel.
Posted: Friday Nov 2nd, 2012 at 3:30 am #30395

Right, that code removes all the ccaps on demotion, so if you take out the code, no ccaps would be removed. For something in between, you’d need to add some some of your own code to remove certain ccaps based on your conditions.

Posted: Friday Nov 2nd, 2012 at 6:16 am #30410
cassel
Username: cassel

Ok.. Maybe it could be an added feature in future versions so that the ccaps associated with a particular recurring payment would be the only ones removed in case of cancellation. It would just make sense, i think: if a user purchase something with a Buy Now transaction, he should not loose it if he stops paying for a membership that is giving him access to something different.

Posted: Friday Nov 2nd, 2012 at 6:35 am #30418

I agree. This is part of what’ll change once we make multiple subscriptions and EOTs possible too.

Posted: Friday Nov 2nd, 2012 at 8:14 am #30432

Regarding the hack, I asked Jason to check if any other places needed to be edited, and he replied this:

That section of code should be commented out (as part of this hack), in the following places:

/s2member/classes/includes/auto-eots.inc.php at line #149
/s2member/classes/includes/paypal-notify-in-subscr-or-rp-eots-w-level.inc.php at line #116

Posted: Friday Nov 2nd, 2012 at 8:27 am #30434
cassel
Username: cassel

I guess in my situation, i CAN do a workaround and remove the associated ccap manually so i can leave the others intact.

Another way, i think it MIGHT work, but i need your opinion. All my “products” are purchased, with ccaps, so the customers are always moved to Level 1, but i dont use the levels as a method to restrict (yet). In fact, even if a member was Level 0, the ccaps they have would still work, right? Is the demotion also moving the member down to Level 0? Can i get the demotion to bring the member to Level 0 AND leave the ccaps intact AND then i would add one layer of protection of the pages with the Level 1 restriction? This would mean that once demoted to Level 0, the member would not have access to the ccap even if the ccap is left there.

Would that work?

Posted: Friday Nov 2nd, 2012 at 8:36 am #30435

The demotion does bring the user down to Level 0, and normally removes all ccaps unless you hack it.

I think it may work when you protect a page with a level and ccap, so that if he doesn’t have the level, even if he does the ccap, he won’t be shown the page, but test to make sure.

Posted: Friday Nov 2nd, 2012 at 8:40 am #30436
cassel
Username: cassel

I sure will try that. I think it would be an easier workaround as it would still be automatic.

Posted: Friday Nov 2nd, 2012 at 8:44 am #30438

Cool. :)

Posted: Friday Nov 2nd, 2012 at 8:55 am #30440
cassel
Username: cassel

Interestingly, i will end up with THREE layers of protection.
– the level which will determine if the user has access or was demoted
– the “element” ccap which will grant the user with the access to the index and potentially, the individual tutorials
– the “elementXXXXXXXX” ccap (our custom Ccap drip timer code) that will get each tutorial to appear based on a set dripping schedule based on that particular ccap (so if the user does have the “element” ccap but not the correct timestamp, i can still give them information on “this will be available on Week X”)

Brilliant !!
(if it works with the Level demotion).

Posted: Friday Nov 2nd, 2012 at 10:12 am #30463

Yeah. :)

Viewing 14 replies - 1 through 14 (of 14 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.