Title: Add CCaps from custom fields automatically
Last modified: August 22, 2016

---

# Add CCaps from custom fields automatically

 *  [ryantcarter](https://wordpress.org/support/users/ryantcarter/)
 * (@ryantcarter)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/add-ccaps-from-custom-fields-automatically/)
 * Hi Guys,
 * Been an S2Member pro user for a while and I’m working on a new site where I’ll
   need to have the ability to change ccaps from a dropdown on a custom field in
   the sign up form.
 * The premise is simple, user signs up. Picks whether they’re Red or Blue from 
   a dropdown and this adds the ccap ‘red’ or ‘blue’ depending on which one they’ve
   selected.
 * Let’s say they picked red – I’ll then get an email handled by the API/Payment
   Notifications telling me I have to send out a red box and they’ll get access 
   to red posts on the site.
 * However, 3 months down the line, the customer decides they want to be a blue 
   member. They change red to blue on the dropdown in their profile and it changes
   the ccaps automatically so they can now access blue posts on the site instead
   of red. Then when the payment fires again, the email will let me know they’re
   a blue member and i’ll send a blue box out.
 * I’ve had a look at the old forums and the new ones on here but I’m a little confused
   as to whether it’s a really easy thing to implement, or a really hard.
 * **Do I need to do the following?**
 * Edit the pro forms to include the ccaps dropdown in there?
 * or
 * Create a cron job that runs to update a users profile and remove/add the old/
   new ccaps?
 * [https://wordpress.org/plugins/s2member/](https://wordpress.org/plugins/s2member/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [krumch](https://wordpress.org/support/users/krumch/)
 * (@krumch)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/add-ccaps-from-custom-fields-automatically/#post-5499558)
 * I would tie a function to “profile_update” and “user_register” hooks, so it runs
   just after the change. Works if admin changes info too.
 *  Thread Starter [ryantcarter](https://wordpress.org/support/users/ryantcarter/)
 * (@ryantcarter)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/add-ccaps-from-custom-fields-automatically/#post-5499713)
 * Cheers [@krumch](https://wordpress.org/support/users/krumch/)

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add CCaps from custom fields automatically’ is closed to new replies.

 * ![](https://ps.w.org/s2member/assets/icon-256x256.png?rev=980067)
 * [s2Member – Excellent for All Kinds of Memberships, Content Restriction Paywalls & Member Access Subscriptions](https://wordpress.org/plugins/s2member/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/s2member/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/s2member/)
 * [Active Topics](https://wordpress.org/support/plugin/s2member/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/s2member/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/s2member/reviews/)

## Tags

 * [custom capabilities](https://wordpress.org/support/topic-tag/custom-capabilities/)

 * 2 replies
 * 2 participants
 * Last reply from: [ryantcarter](https://wordpress.org/support/users/ryantcarter/)
 * Last activity: [11 years, 5 months ago](https://wordpress.org/support/topic/add-ccaps-from-custom-fields-automatically/#post-5499713)
 * Status: not resolved