WC User Order Count Column
Adds a column to the Users admin screen showing the total number of WooCommerce orders per user.
by Duelling Pixels · github.com/duellingpixels/user-woocommerce-orders-column
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/duellingpixels/user-woocommerce-orders-column/archive/refs/heads/main.zipWC User Insights: Orders & Spend Column
WC User Insights is a lightweight, high-performance WordPress plugin that enhances the User admin screen (wp-admin/users.php). It provides store administrators with immediate visibility into customer value by displaying total order counts and lifetime spend directly in the user list.
✨ Features
- Order Frequency: Displays the total number of "Processing" and "Completed" orders.
- Lifetime Value (LTV): Shows the total currency amount spent by the user across all successful transactions.
- Performance First: Uses optimized
idsqueries and the native WooCommerceget_total_spent()function to ensure zero lag on high-traffic sites. - Fully Sortable: Click column headers to instantly find your highest-spending VIP customers.
- Clean UI: Uses subtle styling for users with no purchase history to keep your interface decluttered.
🛠 Installation
Method 1: The Plugin Folder (Recommended)
- Create a folder named
wc-user-insightson your computer. - Create a file inside named
wc-user-insights.phpand paste the provided PHP code into it. - Upload the folder to your server at
/wp-content/plugins/. - Navigate to Plugins in your WordPress dashboard and click Activate.
Method 2: WordPress Dashboard Upload
- Follow steps 1 and 2 from Method 1.
- Compress the
wc-user-insightsfolder into a.zipfile. - Go to Plugins > Add New > Upload Plugin.
- Choose your
.zipfile, install, and activate.
🔍 How to Use
Once activated, navigate to Users > All Users. You will see two new columns:
- Orders: The count of successful purchases.
- Total Spend: The cumulative value of those purchases in your store's currency.
[!TIP] Click on the Total Spend column header twice to sort by descending value. This is the fastest way to identify your top 10% of customers for targeted marketing or loyalty rewards.
⚙️ Technical Details
- Status Filtering: To ensure data integrity, only orders with
processingorcompletedstatuses are calculated. - Hooks Used: *
manage_users_columnsmanage_users_custom_columnmanage_users_sortable_columns
- Compatibility: Works with WooCommerce 3.0+ and WordPress 5.0+.
📄 License
This project is open-source and available under the MIT License.