Title: Add a user group programmatically
Last modified: October 22, 2016

---

# Add a user group programmatically

 *  [besharptherapy](https://wordpress.org/support/users/besharptherapy/)
 * (@besharptherapy)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/add-a-user-group-programmatically/)
 * Hello,
    Is there a way to add a group programmatically? Which action/filter do
   I need to use?
 * I have a membership site that requires the group to register (and pay a fee) 
   before group members can register (and also pay a fee). I’m using the Simple 
   Membership plugin to deal with payments and membership types.
 * As part of the post-payment processing, I’d like to automatically add the group
   so that when the group members register, their group is present on the registration
   form.
 * Any help would be appreciated.
 * Joe.

The topic ‘Add a user group programmatically’ is closed to new replies.

 * ![](https://ps.w.org/user-groups/assets/icon-256x256.jpg?rev=1179282)
 * [User Groups](https://wordpress.org/plugins/user-groups/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/user-groups/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/user-groups/)
 * [Active Topics](https://wordpress.org/support/plugin/user-groups/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/user-groups/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/user-groups/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [besharptherapy](https://wordpress.org/support/users/besharptherapy/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/add-a-user-group-programmatically/)
 * Status: not resolved