WooCommerce and s2Member

One of the recurring topics about s2Member has been how can it be made to work using WooCommerce as a cart instead of using s2Member’s own integrations with payment processors.

I have just come across a plugin that might provide the answer for many people seeking this functionality. It’s called WooCommerce Role-O-Matic. It enables you to assign a role to someone making a purchase using WooCommerce, so you could set up the purchase of a digital product that is just the role.

Among other features, it allows for fixed-term and open-ended roles, as well as role renewal (though you might prefer to handle renewals through s2Member).

It’s available on CodeCanyon for $18. I haven’t used it on a site, but it has a 5 out of 5 user rating. It also seemed very easy to use from the demo I tried.

1 Like

But how do you set EOT - how can you set the other s2member fields like Custom Value, Custom Capabilities and so forth?
How could you add the information about the subscription?

Simply creating a user with a certain role is easy to do without this plugin with a little code - it’s the custom fields that I don’t know how to set…

(and yes - it would be huge huge step forward to get rid of s2member checkout and fully replace it with woocommerce. Much more gateways, loads of invoicing solutions, better UI and so on - 2017 vs 2010 feeling so to say).

I agree that simply setting a user role via WooCommerce has been easy for some time. It’s the fact that this plugin sets the EOT that makes it interesting.

Of course, I can’t be 100% certain because, as I made clear, I haven’t purchased the plugin. But I expect what you’d do is locate the metadata that this plugin sets, and then (for the EOT) copy it into s2Member’s meta. I’d expect an essentially similar approach would be involved for other fields, except that you wouldn’t be copying the metadata but instead translating it into “s2Member-speak” so as to then place it into s2Member fields.

Now, if you have a complex set of subscriptions and protections, this almost certainly isn’t going to be the way to go. You’d use WooCommerce Restrictions – the successor to s2Member that’s designed specifically to work with WooCommerce – or something else that’s designed specifically for the job.

But for those on a budget or with relatively simply subscription/buy now requirements, the approach I’ve described would work fine.

I looked into the Demo - it won’t set the EOT - it will however schedule automatic degradation of user roles - I don’t see that it saves that info into a field. I rather guess it’s somewhere deep down in the database as you cannot edit any of it - but only see it.
However I don’t see how you could actually extend the time with further purchases - other functionality like emails before/on EOT and so on - all will need to be configured via woocommerce.

Also there are role renewals - I don’t see how you could add up time (say 6 months left, add another year).

The thing is - basically if nothing of the inbuilt s2member functionality except user roles will be usable - why then use s2member at all? I will simply overcomplicate things - in that case just run a woocommerce native membership plugin instead of patching something together.

I don’t see how you can get the data into the s2member format for the user.

What do you mean by “automatic degradation of user roles”? The plugin has to store the information somewhere, and that somewhere is the database. You say “deep down,” but that means nothing. It will just be in a meta field somewhere that you will find by using phpMyAdmin.

When you have found the relevant metadata, you just write a function that is triggered when the metadata is created and then either copies it or places other values into metadata fields that s2Member can recognize. Even with my rudimentary PHP skills, that’s easy.

So then you can have, for example, an s2Member EOT, which can be used to trigger emails and relegation to level 0 or whatever as normal in s2Member.

With conditional shortcodes, you could also then make available billing forms for renewals, etc.

Ha, ha! If your use for s2Member is just to create recurrent subscriptions to roles, then you’re right. But that’s not how I or many others use s2Member. Indeed, if that is really all you need, there would seem to be no particular need for you to use s2Member in the first place.

What matters to users like me are s2Member’s highly sophisticated means of protecting and delivering content that no other plugin can get near. Payment is the least of what I want it for. (I actually suspect that my views are rather similar to Jason’s, and explain why he has never been that keen on writing integrations with other payment processors.)

yes deep down - I meant in database. But I guess in a fully different format than s2member. So I don’t think it will be that easy.

(I do use loads of conditional shortcodes - actually so many that it gets really confusing and before I can change something on my checkout page I have to read through many minutes to not get the wrong condition). And well - I need s2member only to create a paywall for static (large - as in up to 10GB) downloads - however for well over 10.000 users. What I don’t need is like now is importing Paypal logs at the end of the month to check for missed IPNs (happens in 1/500 IPN for me), a UI for Stripe checkout that causes me 10 customer emails per day because people do not manage to checkout, and most do not even bother to email you but simply decide not to checkout at all, and/or accounts needing manual treatment in case of Paypal conflicts and so on. Needs to be working as for Stripe - but it’s not. (e.g. with Paypal you can configure s2member not to handle conflicts, or handle them. But if you let s2member handle them then user is blocked once he creates the conflict - and not once he won/lost it as it should be. So even though paypal nicely sends IPN notices about it - they are simply not cared for. (e.g. if a user directly uses access when he complains about “product not working” - and you block his account that moment - well then actually he is now right. If you chose not to use s2member to handle it - once paypal sends you email that they decided on the outcome of conflict - you have to login to paypal to see what they decided, then accordingly restore/delete user.

In the end a single paypal conflict causes me like 30-40minutes of admin time (new return invoice, setting manual EOT in many cases, unblocking/blocking), logging into paypal and reply, and so on. Half of that time could be saved if s2member had a mode to only delete/rate down user if paypal conflict is decided in buyers favour.

(oh and no - I do not want a link to change credit card here, a link to terminate account here and so on. It should be all fully working and customers should have a single page with everything they need about admin (invoices, EOT, chaging plans, updating credit card, and so on). Oh and for example an email going out if subscription payment fails the first time (so user updates his credit card for the next try of paypal/stripe). Email going out if subscription got blocked by bank, and so on. I get stuck every day with minimum 1 hour of admin work on average because s2member is missing out.

Oh, change the record, Felix!

I’ve been reading your whinging for years. If things really were that bad, you’d have moved to another plugin a long time ago. And yet you haven’t.

Perhaps you just like complaining.

1 Like

So there’s nothing that integrates WooCommerce with S2Member?

Yes, there is. The WooCommerce Role-O-Matic plugin to which I referred at the very start of this thread does the job.

It doesn’t have EOT functionality

If you mean that it doesn’t set the EOT within s2Member, then you’re right. However, it certainly does have EOT functionality. It just handles that itself. I should also think it wouldn’t be that hard to write a function to connect its EOT functionaility with that of s2Member.

1 Like

I’m curious…
if Role-O-Matic protects the pages, then why do I need S2Member?

It also comes with https://wpsharks.com/product/if-shortcode-pro

Enlighten me please cause I really like S2Member, and if I could have pretty checkout pages like the ones I get with WooCommerce, then I’d drop WooCommece and just stick with s2member Pro.

Using Role-O-Matic doesn’t mean getting rid of s2Member, because Role-O-Matic doesn’t protect pages. It is an add-on to WooCommerce.

Role-O-Matic enables you to sell roles, whether as one-offs or as subscriptions, but via WooCommerce. If you have s2Member activated, you can thus use Role-O-Matic to sell s2Member roles.

Obviously, s2Member already comes with the ability to sell roles, but using Role-O-Matic overcomes some actual or perceived limitations of s2Member in terms of that particular area of functionality.

First, if you use Role-O-Matic, you can then use any payment processor add-on that works with WooCommerce. So you aren’t limited to using PayPal, Stripe, Authorize.net, or Clickbank as your payment processor (as you are with s2Member).

Second, some people want a wider range of information available to them for the purpose of analytics than s2Member provides. Using Role-O-Matic means you just need to activate an appropriate WooCommerce add-on to get what you want.

Third, some people say they have trouble getting s2Member to work correctly for payments (at least for PayPal). So they can use Role-O-Matic and make the connection to PayPal using WooCommerce instead.

Fourth, some people want to integrate a membership part of their site with an e-commerce part. Using Role-O-Matic means that this can be done easily via WooCommerce because you then don’t need to use s2Member forms or buttons.

Five, some people want to sell other items together with a membership, or require an upload at the same time as selling a membership. WooCommerce makes both possible with the appropriate add-ons, and Role-O-Matic makes using WooCommerce possible.

Sixth, some people are concerned that the lack of updates to s2Member might mean that it ceases to be compatible with the APIs of the payment processors with which it is supposed to work. Using Role-O-Matic means that you use WooCommerce for that instead and, since WooCommerce is updated on a much more regular basis, there is no chance of such incompatibility.


You are brilliant!

Thank you for such an extensive explanation :clap:

VERY helpful!

1 Like

I implemented S2member last year for a membership site for an association and I really wish we hadnt… We’ve already had to do so much workaround with S2 member taxes not working properly paypal, and now discovering there is really no way to post billing history. I would highly recommend woocommerce if someone is looking at membership plug ins now. Woo also has a subscriptions extension now.

@KTS915 - Just to clarify as I’m looking around at alternatives, what do you see as the main differences between woocommerce membership with subscriptions and s2member?

@oyegigi I’d say the main differences are these:

  1. WooCommerce plus Memberships (with or without Subscriptions) is much, much more expensive than s2Member (with or without Role-O-Matic and/or Subscriptions).
  2. There is some doubt about whether s2Member’s metaboxes (indicating protection level) will work with WordPress 5.0. They didn’t with earlier versions of the Gutenberg (GB) editor plugin, then they did, then they didn’t with versions of GB merged into core. Not sure what the position is now. But you could always avoid that issue by using the Classic Editor plugin or switching your whole site over to ClassicPress.
  3. If you use Role-O-Matic to sell roles, you might need to add some custom code to have s2Member handle the renewal of subscriptions automatically. Otherwise, you can use WC Subscriptions for that, or else just let users renew manually.

Thanks @KTS915, appreciate your thoughts!

absolutely smart way Tim.
the plugin u suggested should definitely do the trick
but have u sorted the EOT issue pls?

On my site, all I need is to be able to sell one-year memberships that give members access to protected pages. I do not automatically renew memberships, so the purchases are all one-time payments.

Would the Role-O-Matic plugin allow me to skip s2Member for the actual payments while still protecting the pages with s2Member?