Add a WooCommerce Orders List Column

by Owais Alam  July 18, 2017

Every WooCommerce Orders list has columns that highlight various details about the order. While these columns could be easily remove through the Screen Options tab, the addition of the columns requires custom code that adds a column to the list.

WooCommerce Order Column

Add a Header

The addition of a custom columns is done through manage_edit-{$post_type}_columns filter (part of the WordPress core). By using this filter, I could change the columns in the list table  and inject my own column(s).

Now I am going to add a column in my intended position.  This would be a new Profit column that would come after the total column for the order.

Now we can use that to get the profit for the order and add it to the column.

Now, the following is optional. I will make the Profit column the same width as the total column. I will add custom CSS to the existing stylesheet by using the function wp_add_inline_style. I will add this to woocommerce_admin_styles:

Adding custom columns to WooCommerce order list is a matter of adding code through a filter. If you need help with the code and the process of adding the custom columns, do leave a comment below and I will get back to you ASAP.

Start Creating Web Apps on Managed Cloud Servers Now!

Easy Web App Deployment for Agencies, Developers and E-Commerce Industry

About Owais Alam

is the WordPress Community Manager at Cloudways - A Managed WooCommerce Hosting Platform and a seasoned PHP developer. He loves to develop all sorts of websites on WordPress and is in love with WooCommerce in particular. You can email him at owais.alam@cloudways.com

Stay Connected:

You Might Also Like...