• Resolved lucytech

    (@lucytech)


    Woocommerce shows a list of customers and information about them. How do I delete customers who have never made an order? I can’t do this from ‘users’ b/c wordpress does not give me the order information.

    I have 13,000 customers I want to delete. If there is a code I can run that would be great. thanks

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @lucytech

    Thanks for reaching out!

    I did some research and found these articles could be a good starting point:

    Hope this helps!

    Thread Starter lucytech

    (@lucytech)

    thanks I ran the database commands and I’m left with about 600 users.

    However, if I go to Woocommerce -> Customers it is still showing 13,600. How do I update this list?

    Hi,

    I understand after deleting customer in database level, WooCommerce is still showing them under WooCommerce > customers.

    If it were up to me, before deleting them, I’d download the list of customers, under WooCommerce > customers you will be able to see a download button:

    Why I’d like to keep the list? Because of marketing purposes, many sellers spend years creating a good group of customers, you can use that list to create a marketing strategy, newsletters, etc. MailChimp, and MailPoet are free plugins that might help you with this.

    However, I understand your point. If you need to delete them, can you please head to WooCommerce > status > tools > clear transients, and click it? You can clear the site cache as well.

    Does the issue persist after that? Let us know how that goes.

    Thread Starter lucytech

    (@lucytech)

    I had to delete them directly from the database table.

    Now it is upto date.

    Hi,

    Now it is upto date.

    Alright, thanks for letting us know. I’m going to mark this as resolved – if you have further questions, feel free to create a new thread.

    Kind regards.

    Thread Starter lucytech

    (@lucytech)

    It would be very helpful if woocommerce customers list had a delete option so it could be deleted.

    The option you gave me in the first thread

    does not have a query to delete them from the woocommerce customers, it only has a query to delete them from the wordpress user list.

    I found the woocommerce customer table in the end but an updated code example would be very helpful for people.

    Thanks

    Hi,

    I understand, you can refer to this forum thread that includes a SQL query (That you can adapt according to your own needs) to delete all customers, please make sure to back up before making any critical change, more information is here.

    Also, please check: How to Bulk Delete all WooCommerce Customer (Using WP-CLI).

    Using plugins this is possible as well, kindly refer to this web article to learn more.

    I hope this points you in the right direction.

    Thread Starter lucytech

    (@lucytech)

    I used those queries and tried those plugins but what I’m tryong to explain is that it deletes users from the user table but NOT from the woocommerce customer table. To do that I ran:

    SELECT * from wp_wc_customer_lookup where user_id not in (SELECT wp_users.ID FROM hyg_users) LIMIT 400;?

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘how do delete customers’ is closed to new replies.