How to delete WooCommerce customer accounts

In the following article we are going to explore in details all the different ways to delete WooCommerce customer accounts. We will learn how to delete individual account, how to delete WooCommerce accounts as well as how to delete multiple accounts at once in bulk.

Account creation in WooCommerce and WordPress

When it comes to account creation in WooCommerce, generally there are two main options:

  • Guest checkout with disabled account creation – this the option where the only way to purchase a product from the WooCommerce store is as guest customer and there in no option to register and create account.
  • Guest checkout as default but with optional account creation – This is the default WooCommerce setting and the most commonly used among WooCommerce shop owners.
  • Account creation is required for all purchases – Used by many WooCommerce stores as account creations has a lot of benefits. For some that are WooCommerce subscription or WooCommerce membership based websites, the only way to purchase a product is to firstly create WooCommerce account via user registration.

woocommerce delete accounts

Benefits of having WooCommerce accounts registration

There are many benefits of using customer registration and account creations. It is beneficial for the customers as well as for the shop owner. Some of the benefits of account registration and creation are:

  • Makes it easier buy again with faster checkout process,
  • Reduce friction as they don’t have to reenter the same contact and shipping details again and again
  • Makes it easier to contact customer support
  • Allows them to track WooCommerce products purchase history and shipping status
  • easier to ask and track refunds

For the shop owner the benefits can be even more significant as having customer data to track and analysed can give the shop owner a lot of insights and ideas about how to improve and grow the business.

However there are situations when you might needs to disable account creation in WooCommerce.

How to disable account creation

Fortunately for us, WooCommerce has an out of the box option to disable account creation. All you have to do is, in your WordPress admin, to go to the : WooCommerce -> Settings -> Accounts tab. There you can find the options that are located at the bottom of the page. One of the option is the “Enable registration on the “Checkout” page”.

You just need to untick -> Enable registration on the “Checkout” page and press the save changes button.

When you need to delete WooCommerce account

There are situations when you might need to delete already existing WooCommerce accounts from your WordPress site. This can be for different reasons like:

  • Customer has requested you to delete their account due to privacy concerns or GDPR rules, or because they might want to create a new account from scratch
  • You want to delete specific WooCommerce account because the customer details are incorrect or because the account is duplicate etc.
  • Delete multiple WooCommerce accounts in bulk, for data cleaning purposeless for example.

How to delete WooCommerce account one at a time

If you only have a few accounts that you want to delete, the easiest way to do it manually. You will need to have admin permissions for this process to work. The process itself is quite straightforward and all you need to do is to delete the WordPress account from the WordPress Dashboard -> Users lists. Navigate to the user that you want to delete, hover over the username and a “Delete” button will show under their username.

wordpress delete single account

Clicking on it will bring a confirmation dialog to confirm that you want to delete the particular WordPress account. This will delete the WordPress user and therefore the WooCommerce customer from the database.

How to bulk delete customers from WooCommerce

If you have multiple WooCommerce accounts that you need to be deleted, the manual deletion method can be quite unpractical and time consuming. This is when we will need a way to bulk delete WooCommerce customers. We have a detailed step by step guide on how to delete WordPress accounts in bulk, in this tutorial we are going to focus on WooCommerce and in this tutorial we are going to explain a step-by-step guide on how to delete a WooCommerce account.

In general this process will have only two steps. The first is to actually find and filter out all of the WooCommerce accounts that we want to delete. Create a separate segment of them so that we don’t accidentally delete customer account that we don’t want. And the second set is the actually bulk deletion of accounts.

The bulk deletion process will use the customer email addresses to select which customer account to delete

For the filtering and segmentation of customers accounts we are going to use the Users Insights plugin. Since our bulk deletion process will use the customer email addresses to select which customer account to delete, we are going use the export feature to export only the emails of the different customer segments for deletion. Let’s look at few different examples of bulk deletion:

How to delete inactive WooCommerce account after a certain time

If you want to delete your inactive WooCommerce customers from your database you can use the Users Insights smart filters to filter out only the inactive WooCommerce accounts.

WooCommerce delete users with no orders

One way to define inactivity is the customers who have not made any purchases at all. To delete WooCommerce non-customers all you need to do is to add the Orders is less than 1 filter:
woocommerce bulk delete inactive customer accounts
Other way is to find all the inactive customers who have not made a purchase in a long period of time, say one year. For this we can use the
woocommerce bulk delete inactive customer accounts orders

Alternatively, instead of using the order data to identify inactivity you can use the website activity. For this we can use the ‘Last seen” filter and select the time period that we define as inactive:
woocommerce bulk delete inactive customer accounts time

WooCommerce delete old customers

You can also bulk delete all the old WooCommerce customers accounts. For this you can use the ‘Date registered ” filter and specify a date that you consider all the accounts created prior to are old and need to be deleted:
woocommerce bulk delete old customer accounts

Now that you have your list of customers accounts that you want to delete all you have to do is export their email addresses. This process is super easy with Users Insights. All you have to do is to make sure you have the email column visible in your users table and press the export button. This will create and download a CSV file containing only the emails addresses that you have selected via the filters.

Bulk delete multiple WooCommerce accounts at once

For the deletion process we are going to use a free plugin that allows you to bulk delete multiple WordPress accounts at once, by using the emails addresses as identifications.

Then install the Bulk Delete Users by E-Mail plugin.

All you have to do is open the CSV file we have exported in the previous steps and copy and paste the email address in to the plugin field. Here are the steps in order:

  1. Copy a few emails from your CSV
  2. Paste them in the plaintext field of the Bulk Delete Users plugin
  3. Run the delete operation

The WordPress plugin will delete all customers and orders data.
It is important to mention that you should definitely consider making a full backup of your WooCommerce database before you proceed with the delation. This process is irreversible and all of the data is permanently deleted and it can not be recovered, so you might lose data that you don’t want to delete.

How to delete all WooCommerce customers

To delete all the customers at once, you use the same process as above but just don’t apply any filter to your WooCommerce customer list. Clicking on the export button of without any filters applied will export all the WooCommerce customer accounts and their emails. Make sure you don’t have the admin user account you are using included in the export. For this you can use the “Role is not” and select “Administrator”:
woocommerce bulk delete customer accounts role

Or you can use the “Role is ” and select “Customer” (or subscriber if that is what your setup is using) to only delete all WooCommerce customers but not any of the other user accounts:

woocommerce bulk delete customer accounts role is

Another way is to delete the customers and their data like delete orders data and delete customers product data, directly form the WordPress database. This can be done with the help of sql queries. But this method is quite advanced and it is not recommended for most users.

How allow customers to delete their own accounts

If you want you can also allow customers to delete their own accounts. You can do this by adding “Delete Account” tab in the WooCommerce My Account page. This can be quite useful for GDPR type of situations where customers can request not only to close account but also to have their data deleted.

To add a delete WooCommerce account button on the front end of your WooCommerce store all you have to do is to install and activate the WP Frontend Delete Account plugin (Alternative is the Delete Me plugin). The plugin will automatically add “Delete Account’ tab under the WooCommerce my account page and add delete my account button on the customer profile page. With this option the WooCommerce customers will be able to delete their own account by clicking the button and confirming their password.