Custom Capabilties

WebSharks:

I have a recurring subscription base at s2member_level1 through Paypal. I am using custom capabilities and I want to be able to sell permanent custom capabilities at s2member_level0 or s2member_level1. s2member won’t let my users signup at s2member_level0 when they purchase a custom capability. I also want s2member_level1 to be able to add custom capabilities by payment.

I will be glad to let custom capabilities signup at s2member_level1 and recurring subscribers signup at s2member_level2. However I am worried that if I use level=“1” in my custom capabilities shortcode my subscribers at s2member_level2 will be demoted when they add a custom capability. The form generator suggests I use use level="*" but it will not let users who don’t have account sign up.

Is there a way to approach this properly using s2member, or should I just hack it with do_shortcode() and put in the variables that I need.

W

That’s because that particular form is for adding a ccap to a current member. That is why the level is unspecified; it simply continues the current level. This means, by definition, that form can’t work for someone who is currently without a level.

To enable someone to buy a ccap at the time they become a member, just use a regular form, and include the relevant ccap in the box provided. Then the user will become a member at the level – and with the ccap – specified.

1 Like

Thanks, I had to update my recurring members to s2member_level2 from s2member_level1 so s2member_level1 could be used by people signing up with only custom capabilities. I wanted to avoid that but it was necessary.

It’s DANGEROUS but this was my solution. Backup and make sure you’re very careful, there are several things to consider including whether you already have people at s2member_level2.

UPDATE wp_usermeta SET meta_value = REPLACE(meta_value, ‘s2member_level1’, ‘s2member_level2’)
WHERE meta_key = ‘wp_capabilities’

That assumes your database prefix is “wp”

Then I used [s2If] conditional shortcodes to make sure my recurring subscribers signup at s2member_level2 and my custom capabilities only members stay or signup at s2member_level1

You could also use pure custom capabilities as s2member suggests.