"-ccap" is not working at all for me when it was last month during testing

For some reason when I remove a ccap like below it doesn’t add anything to the members account.

[s2Member-Pro-Stripe-Form level=“2” ccaps=""-022017r",032017,042017,052017,062017,072017,082017,092017,102017,112017,112017r" desc=“Renewal Digital Download Special” cc=“USD” custom=“www.domain.com” ra=“0.00” rp=“1” rt=“L” rr=“BN” coupon="" accept_coupons=“0” default_country_code=“US” captcha=“0” /]

Placing this in the generator

“-022017r”,022017,032017,042017,052017,062017,072017,082017,092017,102017,112017,112017r

presents this and does not remove the item just adds to the list.

[s2Member-Pro-Stripe-Form level=“2” ccaps="__022017r,032017,042017,052017,062017,072017,082017,092017,102017,112017,112017r" desc=“Premium Subscriber / description and pricing details here.” cc=“USD” custom=“www.domain.com” ta=“0” tp=“0” tt=“D” ra=“0.50” rp=“1” rt=“M” rr=“1” coupon="" accept_coupons=“0” default_country_code=“US” captcha=“0” /]

I had original top one working a month ago but now it fails to work at all and I am at a loss. I can not use the -all as each member has different ccaps that are unknown to the system.

Any help would be great.

Ross

You need to change the underscore at the beginning of your list of ccaps to be removed to a regular hyphen.

When I use just the hyphen - I get this at the page where the form is.

Invalid form configuration. Invalid “ccaps” attribute. Custom Capabilities. When provided, must be all lowercase [a-z_0-9,]. A preceding -all, directive is also acceptable.

[s2Member-Pro-Stripe-Form level=“2” ccaps="-022017r,032017,042017,052017,062017,072017,082017,092017,102017,112017,112017r" desc=“Renewal Digital Download Special” cc=“USD” custom=“www.domain.com” ra=“0.00” rp=“1” rt=“L” rr=“BN” coupon="" accept_coupons=“0” default_country_code=“US” captcha=“0” /]

It was when I added the ccaps above into the generator that I got the underscore.

Not sure why it is not working now that it is live when it worked during testing.

Ross

Also if I just place -022017r into the system it turns it into -all and I can’t have that as it would wreck all accounts.

Ross

Please try to change
ccaps=""-022017r",032017,042017,052017,062017,072017,082017,092017,102017,112017,112017r"
to
ccaps="-022017r,032017,042017,052017,062017,072017,082017,092017,102017,112017,112017r"
Means, to not put quotes inside quotes.

Hi Krum,

I have been traveling this week and just returned to the office.

The above statement you presented produces an error message on the form “Invalid form configuration. Invalid “ccaps” attribute. Custom Capabilities. When provided, must be all lowercase [a-z_0-9,]. A preceding -all, directive is also acceptable.”

I may have to ask Jason or just come up with a different renewal system.

Is there a way to check multiple conditions like: has ccap 012017 and 022017r but not ccap 032017 to trigger a show this ( renewal payment button )?

Strange… Well, try to move the negative ccap to right (last in the array). But still strange, should works, so you may need to post a bug report.

You can use [s2If conditions] to check multiple ccaps, check “API / Scripting”.

The list of ccaps="" can contain only valid CCAP names that include a-z, _, or 0-9. You can also precede the list of CCAPs with the special keyword -all to remove all CCAPs before adding new ones.

What you can’t do at this time is use a - hyphen in front of a specific CCAP to remove that specific CCAP; i.e., the only removal that can occur via this attribute at present is to remove -all by starting the list of CCAPs with that special keyword.

It’s also worth noting (though maybe irrelevant in this particular case); that whenever checkout is complete, the list of CCAPs that you have in the ccaps="" attribute are added to any that already exist. None are removed that a user already has. So it’s not necessary to provide a full list of all possible CCAPs in every single Pro-Form. You only need to list those which are being purchased using any given Pro-Form instance. In other words, if a customer has already bought CCAPs a,b,c in the past, and they then purchase CCAPs x,y,z, when they complete checkout they have all of them, not just those from their last purchase. The only exception to this is if you do use the -all keyword in the list.

As @krumch noted, you can use the [s2If /] shortcode or PHP conditionals to check for specific CCAPs.

Hope it helps :slight_smile: Let me know if there is a feature request out of this thread.

1 Like

I would love to have the feature added to s2member Jason. I basically place this in my members area.

[s2If current_user_can(access_s2member_ccap_092016r)]
Your Account Has Expired Sept 2016
Renew Now (Link)
[/s2If]
[s2If current_user_can(access_s2member_ccap_102016r)]
Your Account Has Expired Oct 2016
Renew Now (Link)
[/s2If]
[s2If current_user_can(access_s2member_ccap_112016r)]
Your Account is Expiring Nov 2016
Renew Now (Link)
[/s2If]
[s2If current_user_can(access_s2member_ccap_122016r)]
Your Account is Expiring Dec 2016
Renew Now (Link)
[/s2If]
[s2If current_user_can(access_s2member_ccap_012017r)]
Your Account is Expiring Jan 2017
Renew Now (Link)
[/s2If]
[s2If current_user_can(access_s2member_ccap_022017r)]
Your Account is Expiring Feb 2017
Renew Now (Link)
[/s2If]

With each Renew Now I have a link to the form that allows them to renew. It also guaranties that the user in question that needs to renew with the ccap in question has the ccap to avoid issues. One further step is I place the same [s2If current_user_can(access_s2member_ccap_022017r)] Payment form [/s2If] on the renewal payment page.

It is one way that makes it so I don’t have to search users that are expiring. I also have plans to add email using the ccap #r to send our notifications or to let users know when they account is good until.

We have a digital pdf magazine that is treated just as a physical paper magazine. I am sure with the ever increasing digital magazine market this would open the door for others.

I would think anyone that offers monthly future download items or posts could use a feature like this. I just hate having the auto pay feature on anything I have and would like to respect our customers in the same way I would want to be treated so I came up with this method. It also reduces our inbound calls and emails on cancellations that cost us more in the long run.

Thanks a bunch for your help on this.
Ross

Thank you. I see how you’re using CCAPs in this case. Can you clarify for me though, what the feature you’re looking for is? Are you looking for an easier way to detect EOT time? Also referencing: https://s2member.com/kb-article/s2eot-shortcode-documentation/#toc-e00e3e46

@rosswaters: This hack may do your life easer, I think… Also there is several manuals and plugins that may do your job.

Thanks, Jason, for the clarification that (at present) you cannot remove any ONE specific CCAP, only ALL of the CCAPS in one go (I thought I just wasn’t doing it right). Does the “at present” imply it might be in the pipeline?