Home › Forums › Backend Issues (wp-admin) › Relationship (User) field can't see Administrator users › Reply To: Relationship (User) field can't see Administrator users
This is only a guess, but there is some filter in WC that is modifying what is returned. It is either something to do with the user query that ACF is doing or it has something to do with ACF getting the list of user roles.
My guess is that it is getting the user roles.
What you need to do is figure out what filter is interfering and then create a filter for the acf/fields/user/query hook that removes this filter.
If I’m right about the user roles than something like this may work
add_filter('acf/fields/user/query/name=field_name_here', 'remove_wc_user_role_filter', 10, 3);
function remove_wc_user_role_filter($args, $field, $post_id) {
remove_filter('editable_roles', 'wc_modify_editable_roles');
return $args;
}
but like I said, that’s just a guess. If that does not work I would talk to WC support and see if they can give you advice on which one of their filters is interfering with the ACF user 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.