Custom Capabilities Syntax

I am working on migrating an old s2member site to a new site with s2member and I updated 2800 users with some custom capabilities that were present in the old site. I have been having trouble finding straightforward documentation about how to create these, but reading between the lines, it looks like I am supposed to prepend them with “access_s2member_ccap_” so for financials custom cap it would be “access_s2member_ccap_financials”. Is this correct?

Do they need to be prepended? I also am unable to see them in the users table, but inside each user page, I can see them at the bottom under additional capabilities. Am I doing this correctly?

How do they show at your users’ capabilities in their profile pages?

With or without “access_s2member_ccap_” substring?

Can you compare both old and new tables to see if their formatting match? There was no change on how the plugin handles it, as far as I know, so the content should be the same, but you probably don’t want it to have the substring in the name of the capabilities themselves when looking at a user profile.

You should also see them separated by commas, if a user has multiple ones.

You can also test a dummy account to see if your site behaves as you expect when having (or not) a custom capability, perhaps by having a test page with a conditional, for example. :slightly_smiling_face:

1 Like

This article may help:

If you have s2Member Pro, you can use its users import/export tool to migrate the users.

:slight_smile:

1 Like