Support

Account

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.