Adding Extra User Roles When Creating A WordPress User From WP Zapier

WP Zapier Integration

Adding extra user roles to a WordPress user can be useful. This code recipe will add extra user roles to the recently created user from Zapier.

In this example, we will simply add the role of “editor” to the recently created user, you are able to add custom roles to the user. This won’t replace the user’s existing role but add onto it. You may be able to use ->set_role( 'your_role' ); to change the user’s role instead.

Add this code to your child theme’s functions.php or custom plugin.

Purchase WP Zapier Plugin

WP Zapier Integration

Add to Cart
 

If you have any further questions, please feel free to open a support ticket.