Coupon code for existing members

Hi,
I have S2member pro and I work with custom capabilities.
Everything works fine but now I would like that some users can fill in a code (coupon code/promo code - What’s in a name) so that their custon capability changes and that they have access to a certain member page.
This is for some users who don’t need to pay (so 100% discount).
I don’t use any of the included pay systems from S2member.

How can I do that?

Thanks, Philippe.

You are going to need to try to explain this again. I’m not sure what your use-case is.

I have an online module, available at a small cost but I would like to have that online module available for free for certain groups/people, that’s all.

So as it is now, people create an account and then then can pay a small amount for an online module and on that payment page, I would like to have a field where they can enter a “code” so that it is entirely free.

Thanks, Ph.

That’s a bit clearer but still not clear. So someone registers then pays then gets an option to make it free! And you are not using s2member for payment!

So here’s the reality:

  • You need to use s2member as the registration overlay on the WordPress registration for s2member subscription tiers to do anything automatically. Otherwise you will need to manually assign users to the appropriate protected content role (e.g. Subscriber, etc).
  • You can use custom capabilities to protect any content and assign the custom capability to any user via their standard WordPress user profile.
  • Without custom code you can’t bind your s2member content protection to a non-s2member payment system other than to show / hide a “Free / payment” button supplied by your non-s2member payment system
  • s2member has no concept of user groups.