Home › Forums › Backend Issues (wp-admin) › All role in the User list field › Reply To: All role in the User list field
I can see yy with this but unfortunately i only see customer role in the list
add_filter(‘acf/prepare_field/key=field_5a47128676459’, ‘my_set_role_filter’);
function my_set_role_filter($field) {
print_r (“yy”);
if (current_user_can(‘shop_manager’)) {
$field[‘role’] = ”;
}
return $field;
}
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.