Title: Programmatically assigning a role?
Last modified: August 24, 2016

---

# Programmatically assigning a role?

 *  [ahmar2](https://wordpress.org/support/users/ahmar2/)
 * (@ahmar2)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/programmatically-assigning-a-role/)
 * Hi
    Thanks a lot for great plugin.
 * I want to assign a role to user once he purchases a specific woocommerce product.
 * I will find the hook for specific product purchase. But I want to ask that how
   can I programmatically assign a particular role to a user?
 * Ahmar

The topic ‘Programmatically assigning a role?’ is closed to new replies.

## Tags

 * [capsman-enhanced](https://wordpress.org/support/topic-tag/capsman-enhanced/)

 * 0 replies
 * 1 participant
 * Last reply from: [ahmar2](https://wordpress.org/support/users/ahmar2/)
 * Last activity: [11 years, 1 month ago](https://wordpress.org/support/topic/programmatically-assigning-a-role/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
