Clean a WooCommerce database of orders and customers

While working on hotfixes for WooCommerce stores it can be helpful to duplicate the live database locally. This brings with it the issue of holding customers’ private data in my development environment.

As a quick fix. Instead of creating a fresh dummy store. Which can take a while to create. I’ve got a list of WP-CLI commands that I can run that will remove this data. While keeping the products intact.

Following the import. Remember to remove the downloaded database from your local development environment.