Hi @cedriccharles
Yes, you can use the following plugin to create the role.
https://wordpress.org/plugins/user-role-editor/
Regards
Thread Starter
Ced
(@cedriccharles)
Hi @jahmedas !
Thank you, but this is not really what I need 🙂
In fact, I have my custom role called “lawyers”. But the users attached to this role don’t appear in the “Support staff” dropdown attached to a new ticket. In this dropdown, I only have “administrators” or “agent”.
I want to be able to choose my “lawyers” users in this dropdown.
Thank you in advance,
Cedric
Hi @cedriccharles
do you use any addon to create the user?
Regards
Thread Starter
Ced
(@cedriccharles)
Hello,
No, it’s custom code 😉 !
I finally achieve this like that:
$lawyer = $wp_roles->get_role('lawyer');
$agent_cap = apply_filters( 'wpas_user_capabilities_agent', array(
'view_ticket',
'view_private_ticket',
'edit_ticket',
'edit_other_ticket',
'edit_private_ticket',
'assign_ticket',
'assign_ticket_creator',
'close_ticket',
'reply_ticket',
'create_ticket',
'delete_reply',
'attach_files',
'ticket_manage_tags',
'ticket_manage_products',
'ticket_manage_departments',
'ticket_manage_priorities',
'ticket_manage_channels',
'ticket_manage_privacy',
'ticket_manage_ticket_type',
) );
foreach ( $agent_cap as $cap ) {
if ( null != $lawyer ) {
$lawyer->add_cap( $cap );
}
}
Kind regards,
Cedric