I’m having an issue with the user field type in Meta Box. I want this field to list only users with specific roles (e.g., administrator, vendor). In the Query args fields, I entered:
role_in -> administrator, vendor
but this doesn’t work because the role__in parameter in WP_User_Query requires an array of values, like:
'role__in' => ['administrator', 'vendor']
However, when I generate the PHP code from Meta Box — even using your online generator — I get:
'role__in' => 'vendor, administrator'
which is incorrect.
My question is: does the Meta Box UI Query args parameter support multiple user roles?
Best regards,
Didier