The following WP-CLI command is a really easy way to delete all existing WooCommerce customer accounts on a WordPress website:
wp user list --field=ID --role=customer | xargs wp user delete --yes
And the best part: all of the information from the customers’ existing orders remained in-tact as well!
RT @om4james: How to bulk delete all #WooCommerce customer accounts using @wpcli: http://t.co/eHrGaXxJ2G #WordPress
How to bulk delete all #WooCommerce customer accounts using @wpcli: http://t.co/rZgAo0ul8p #WordPress #WP #eCommerce
Thanks James, this is a great idea and using xargs makes wp-cli even more valuable.
Thanks David, happy to help!