• Resolved rqcmt

    (@rqcmt)


    If you have already registered as a user, you can delete it from the user settings of WordPress.
    How do I delete a customer who purchased without user registration?

Viewing 14 replies - 1 through 14 (of 14 total)
  • Hi @rqcmt,

    If a customer makes a purchase without registration, no account is created for them. Only users with an account are considered customers in WooCommerce and assigned the ‘customer’ role.

    For guest users, their personal info is only available in the order, the payment gateway and newsletter (if they signed up for one).

    Thread Starter rqcmt

    (@rqcmt)

    Thanks for the reply.
    I want to delete Customers in Woocommerce.
    They are not registered as WordPress users, so I cannot delete them.

    Mirko P.

    (@rainfallnixfig)

    Hi @rqcmt,

    If I understand correctly you want to remove guest users that are not registered customers since they’re not showing under WP-Admin > Users.

    I’d suggest using the built-in WordPress Erase Personal Data feature as found under Tools. Learn more on this tool here: https://www.ads-software.com/support/article/tools-erase-personal-data-screen/.

    Cheers.

    Thread Starter rqcmt

    (@rqcmt)

    Thank you.
    However, it doesn’t show up in the list in the Erase Personal Data feature.
    In the Customers list, there is no link to user for customers who are not registered as users as shown in the capture.
    https://prnt.sc/13xe1ig

    Mirko P.

    (@rainfallnixfig)

    Hi @rqcmt,

    Thanks for your reply.

    Basically, under WooCommerce > Customers the users without a link are guest users and not registered users. Guest users are those who placed an order without registering.

    As said, you can trigger Data Erasure Request for those guest users by entering their email addresses under Tools > Erase Personal Data and sending the request.

    Cheers.

    Thread Starter rqcmt

    (@rqcmt)

    Thank you.
    I see, I was mistaken.
    In Erase Personal Data, you make a request from an email address, not a listed one.
    So this feature will send the request email even if the address is not actually registered.

    And if you have hundreds of such customers, it can be a lot of work.
    And if they do not respond to your request, you cannot delete them.
    It is the specification of Woocommerce, not WordPress itself, that allows these customers to remain, right?
    If you can’t delete them via the UI from the dashboard, is there any way to delete them from the database?

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    If you can’t delete them via the UI from the dashboard, is there any way to delete them from the database?

    You can delete the customer by going into the wp_wc_customer_lookup table within your site database. From there, just look for the customer and delete it.

    Afterward, please go to Dashboard > Tools > Delete Transients in order to see the changes reflected on your site.

    I hope that helps ??

    Thread Starter rqcmt

    (@rqcmt)

    Thank you.
    I’ve tried it.
    I deleted everything in wp_wc_customer_lookup, but the users are still there in “Woocommerce > Customers”.
    Also, there is no “Dashboard > Tools > Delete Transients” menu.
    I wonder why?

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Apologies!

    I mean to the following path: WooCommerce > Status > Tools > Clear Transients

    Kindly let me know how it goes! ??

    Thread Starter rqcmt

    (@rqcmt)

    Thanks for the reply.
    I found the button “Clear transients” in “WooCommerce transients” and “Expired transients”, so I did it.
    Isn’t that what you meant?
    Anyway, there is still a list of customers with unregistered accounts in “Woocommerce > Customers”.

    Mirko P.

    (@rainfallnixfig)

    Hey @rqcmt,

    Thanks for the update!

    All right, let’s try another method. I tried this on my test site and it worked! Run the below snippet on functions.php within a child theme or use a plugin like Code Snippets by Code Snippets Pro to add custom code into your site without directly accessing the functions.php file.

    global $wpdb;
    $wpdb->query( "DELETE FROM <code>wp_options</code> WHERE <code>option_name</code> LIKE ('_transient_wc_report_customers_%')" );

    Here is a tutorial to learn more about Code Snippets: https://ferdykorpershoek.com/code-snippets-tutorial/.

    Hope this helps.

    Thread Starter rqcmt

    (@rqcmt)

    Hello, Mirko P.

    Thank you again and again.
    First of all, I have to report something.
    I checked again after a day, and to my surprise, the unregistered customers had disappeared from the list.
    I didn’t do anything about it.
    Thinking that there might be a time lag, I tried placing the order again without registration.
    However, as soon as I delete the order, the customer is gone.
    I’m a little confused.

    I had a backup of the database, so I reverted to the stage before the deletion.
    Then I deleted the order, but the customer remained.

    Unfortunately, adding the code you gave me to the functions.php of the theme did not delete the customers.
    I’ll see if the customer deletes after another day in this state.

    • This reply was modified 3 years, 9 months ago by rqcmt.
    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    Hi there ??

    I checked again after a day, and to my surprise, the unregistered customers had disappeared from the list.

    Probably, this was due to caching. It would be great to use a caching plugin in order to see the changes on your site immediately.

    I’ll see if the customer deletes after another day in this state.

    Please keep us posted, we will be more than happy to help moving forward. ??

    Cheers!

    Plugin Support Gabriel – a11n

    (@gabrielfuentes)

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – if you have any further questions, you can start a new thread.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘How to delete a customer’ is closed to new replies.