There may be times where you want to clean up your WordPress database of WooCommerce customers. For example if your website is the unfortunate target of a spam attack where hundreds, or maybe thousands, of spam user accounts get created. You probably don't want to go to your users page and have 95% of the users be spam users.
The code below can be run to clean up those users. Just create a PHP file in the root of your WordPress directory and put this code there. I usually call it something like prune_customers.php.
prune_customers.php