Plugin Development – Add a column to woocommerce analytics tables

I haven’t found a lot of documentation for adding a column to a Woocommerce analytics table. There’s this one, which doesn’t provide much context and therefore doesn’t work: https://developer.woocommerce.com/2021/02/04/adding-columns-to-analytics-reports-and-csv-downloads/

And then there is this one, which is based on the use of a deprecated plugin, woocommerce-admin. I understand that woocommerce-admin has been merged with woocommerce/woocommerce but I am not sure how to use it for this purpose. https://stackoverflow.com/questions/69560032/try-to-add-order-item-name-column-in-woocommerce-analytics-orders-report-tabl

The above attempts basically have different configurations in terms of what I am trying. I’ve also tried creating woocommerce-trunk (instead of the deprecated woocommerce-admin) to try to create an extension for this purpose, which I haven’t been successful with either.

The end goal is to add a column to the product analysis table and fill it with an ACF custom field associated with the product.

Help is always greatly appreciated, thanks

Leave a Comment