This website uses cookies

Our website, platform and/or any sub domains use cookies to understand how you use our services, and to improve both your experience and our marketing relevance.

CloudwaysCDN — a powerful solution that offers superior performance and satisfied global audience for your business. Read More

Add a WooCommerce Orders List Column

Updated on  18th July

2 Min Read
Reading Time: 2 minutes

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.

Share your opinion in the comment section. COMMENT NOW

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

Start Growing with Cloudways Today.

Our Clients Love us because we never compromise on these

Get Our Newsletter
Be the first to get the latest updates and tutorials.

THERE’S MORE TO READ.