Automatic membership upgrade when registering for an event

Hi all,

I have been using S2 Member to run a dog training club site and allow club members access to restricted portions of the site. The club would like to sell training class registrations online via paypal, and allow students from the previous class session priority access to the next class session. I currently use Events Manager Pro to serve the classes and allow logged in accounts to register and pay for the classes. Events Manager Pro works well with S2 Member, though you can only restrict registration for classes by membership levels, not custom capabilities.

To avoid manually changing account membership levels, I am trying to figure out a way to automatically upgrade membership levels when someone completes registration for a class. Ideally this upgrade would not happen until payment has been accepted and registration has been confirmed, but upgrading when registration occurs is sufficient. Then, using some variety of expiration on the upgrade, they are automatically downgraded after 6 months IF they do not register for the next session.

I know the easiest way to do this would be with custom capabilities, and each session gets its own ccap code. Then we just automatically add that ccap to each account that registers for a class, but Events Manager Pro doesn’t seem to allow restricting online registrations based on ccaps, only based on membership level.

Events Manager Pro uses a shopping cart type system to allow multiple registration purchases at once. So there could be a place to place the pro-form, but I don’t want the users to even see the form. I want the membership change to happen automatically without any input from the user.

So two questions:

Is there another way to do this that I am not considering?

How would I even go about adding the (hidden) pro-form to the checkout page/making this an automatic upgrade?

Thanks for your help!

Does anyone have any ideas?

You really need to talk to the devs for that plugin first to see if that’s right. You also need to ask them for a hook that is fired when a class is purchased. Then it should be easy either to add a ccap (which I agree would be better, since it will allow a member to have more than one ccap) or to change the member’s role.

But until we know the relevant hook, there’s not much anyone here can suggest.