Wholesale Hack: Identify Potential Wholesale Customers In Your Customer Base

Wholesale Hack Identify Potential Wholesale Customers Your Customer Base

If you run an e-commerce store you’ll know that it’s far from a “passive” time investment.

There’s lots of time consuming areas of your business like marketing, advertising, social media, refunds, customer support and more that keep you from recruiting new wholesale customers.

So what if there was a neat way to identify potential wholesale customers in your existing customer base?

You’d be surprised about the amount of physical businesses that will purchase product from regular stores and resell it for profit in a different retail setting. These people get more and more easy to identify by how much and how frequently they order.

Here’s a little code hack you can load into your functions.php file in your theme that will add two extra columns to your Users list (Users->All Users). It will show the key order details of how many orders they’ve made and how much they’ve spent in total.
function add_user_details_columns($columns) {
    $columns['user_orders'] = 'Orders';
	$columns['user_total_spent'] = 'Total Spent';
    return $columns;
}

function show_user_details_column_content($value, $column_name, $user_id) {
    if ('user_orders' == $column_name)
		return wc_get_customer_order_count($user_id);
	else if ('user_total_spent' == $column_name)
		return wc_price(wc_get_customer_total_spent($user_id));
    return $value;
}

function add_order_details_to_user_list() {
	add_filter('manage_users_columns', 'add_user_details_columns');
	add_action('manage_users_custom_column', 'show_user_details_column_content', 10, 3);
}

add_action('admin_init', 'add_order_details_to_user_list');

Once this snippet is installed, you’ll see two new columns on your All Users screen in the backend that look similar to this:

Extra Order Details User Columns

This will help you quickly identify which customers are spending the most in your store and you can then investigate and conduct manual outreach to see if they are actually a store that could be turned into a wholesale account or just a whale of a customer!

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn
Share on email
Email

4 thoughts on “Wholesale Hack: Identify Potential Wholesale Customers In Your Customer Base

  1. Hi, thanks for the post!

    How could I display only pending orders of the logged in customer? And instead of show it in admin, put on front-end?

    Thanks in advance!

    1. Hey Myst,

      Displaying on the front end depends largely on where you want to put it. There’s loads of hooks around that you can use to drop the value in there.

      I’d suggest probably using wc_get_orders (https://docs.woocommerce.com/wc-apidocs/function-wc_get_orders.html) and restrict it to the current user and certain statuses. This function is basically a wrapper for get_posts (https://codex.wordpress.org/Template_Tags/get_posts). So it’s quite flexible.

      If you aren’t a developer I suggest passing this onto one as it’s starting to get into advanced PHP territory!

      Cheers,
      Josh

    1. Hey Max,

      Sortable is another story unfortunately, but what I’d recommend if you were looking to do some deeper analysis about who is the best customers would be to export Orders. There’s a free plugin called WooCommerce Simply Order Export which might do the trick!

Leave a Reply

Your email address will not be published. Required fields are marked *

[FREE GUIDE]
[FREE GUIDE]
[FREE GUIDE]
[FREE GUIDE]