All customers in Woocommerce are listed as role "none"

I was trying to echo a list of all users in woocommerce site. it worked with "role=subscriber", but it didn't work with "customer".

when I checked the admin, I saw all customers are listed as "none" in the role column.

How can I change the role for all of this users?

Capture from the admin panel:

If it helps: I have "user role editor" plugin installed on this site

Answers


It looks like the page could not load the users meta data, which is understandable when talking about this amount of users (i'm guesting on hosted server with custom fields).

this could be a php memory_limit problem, you can add:

ini_set('memory_limit', '-1');

at the beginning of the /wp-admin/users.php page. if it's not working try to create a simple php file that contains the following code:

<?php
error_reporting(E_ALL);
 ini_set('display_errors', 1);

get_users();//or with 'role=customers' 
?>

So you can see the actual error from the function.


Have you tried disabling the User Role Editor plugin to see what happens?

This might be causing a conflict with the woocommerce users, causing them to be "none".


Need Your Help

How to Canonicalize a Stax XML object

java dom stax canonicalization

i want to Canonicalize a Stax object, the program it's doing it with DOM, but dom can't manage big XML documents (like 1GB), so STAX it's the solution.

Why is a multithreaded C program forced to a single CPU on Mac OS X when system() is used in a thread?

c++ c linux multithreading macos

I encountered a strange difference in the behavior of a program using pthreads between Linux and Mac OS X.