1

Is it possible to add custom field to a custom role? Say I want to create roles that represent a membership level and want to add billing options to it. So it'd look like this:

Membership level (Custom Role) | Billing options
-----------------------------------------------------------
Free                           | Null
Basic                          | Monthly, Quarterly, Yearly
Pro                            | Yearly, Bi-yearly

The thing I want to achieve is to create a membership level (role) and then on top of attaching capabilities to it, I want to store additional custom data on top of which I can build some business logic. So a role object would look like this:

Role
|- Capabilities (array)
|- Custom Fields (array)
   |- Billing (single string)
   |- Upgrade options (single string)

Is this possible in Wordpress? Or I'm looking the wrong direction and this should be done in a different way?

Thanks in advance

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.