WooCommerce – Delete Customers After X Days without Purchases

In this tutorial, we’ll show you how to delete customers after X days without purchases. We always have some customer profiles who have been registered for some months and have not registered any purchase yet. And these are useless profiles occupying some space in our database.

We’ll show you how to quickly find and delete them. And we won’t use any snippet nor will we check user profiles one by one. Instead, we’ll use the WooCommerce Customers Spreadsheet plugin.

It displays all our customers in a spreadsheet where we can do advanced searches and apply bulk changes in seconds. With this plugin, you don’t have to worry about spending a lot of time editing your customer profiles because you have all the benefits of spreadsheets to help you save lots of hours and clicks.

Once installed and activated, just follow these steps to delete your customers how were registered some time ago and haven’t purchased anything.

1- Open the WooCommerce customers spreadsheet

To view all the WooCommerce customer profiles displayed in the spreadsheet, go to WP Sheet Editor > Edit Users. All the WordPress users will be displayed as rows and their complete fields will be displayed as columns.

woocommerce-delete-customers-after-x-days-without-purchases

2- Search for all the users you’ll delete

To search for all the customers without purchases for the past three months, for example, you need to open the Search tool with one click on the toolbar.

woocommerce-delete-customers-after-x-days-without-purchases

Here are two ways you can search for customers without orders since a specific date.

a) Search for customers who haven’t purchased anything since they registered

Once there, you need to select these values to search for all the customers without purchases for a certain period of time:

woocommerce-delete-customers-after-x-days-without-purchases

  • Role: Customer

Tick the Enable advanced filters checkbox and select these values:

  • Field: Registration date
  • Operator: We’re on May 11, 2020. And we want to select all customers registered on February 01, 2020 and before, so we need to select <=.
  • Value: Enter the date following the YYYY-MM-DD format. In this example, we’ll enter this date: 2020-02-01.

Click Add New to create a new advanced filter and select these values:

  • Field: Orders count
  • Operator: =
  • Value: 0

Finally, click Run Search to filter all the search results without purchases since the selected date. They will be displayed in the spreadsheet. You’ll see the filters you applied.

woocommerce-delete-customers-after-x-days-without-purchases

b) Find all customers who haven’t purchased anything since a specific date

We have added the option to filter your customers by the last purchase date. That means you can find customers who haven’t purchased anything in the last month, year, etc.

Open the Search tool and select these values:

woocommerce-delete-customers-after-x-days-without-purchases

Role: Customer

Tick the Enable advanced filter and select these values:

  • Field: WC: Last order date
  • Operator: CONTAINS
  • Value: Enter the date using this format: YYYY-MM-DD

Finally, click on Run search.

3- Delete all the filtered customer profiles

After filtering all the customers without purchase for a certain time, they will be displayed in the spreadsheet. You need to open the Bulk Edit tool with one click on the toolbar.

woocommerce-delete-customers-after-x-days-without-purchases

Once you open the Bulk Edit tool, select these values to delete all the filltered customer profiles at once.

woocommerce-delete-customers-after-x-days-without-purchases

  • Select the rows that you want to update: Edit all the rows from my current search (including non-visible rows)
  • What field do you want to edit: Status
  • Select type of edit: Set value
  • Replace existing value with this value: Delete
  • Click Execute Now to apply these values.

Done!

After applying these values, all the customers registered on the selected date and before will be deleted from your database.

That’s how simple it is to filter and delete all customers after X days without purchases. You don’t have to open them one by one; instead, you can quickly filter and delete them all at once!

Do you need help?

You can receive instant help in the live chat during business hours, or you can contact us and we will help you via email.