I am trying to modify the columns in the Woocommerce orders.php table. I would like to get rid of the TOTAL column as well as the DATE column and then I would like to add a new column with some custom information that’s specific to my store.
The following function used to work but has been deprecated since Woocommerce 2.6. So the question is, does anybody know how to delete/add columns to this table after 2.6?
function wc_get_account_orders_columns() {
$columns = apply_filters( 'woocommerce_account_orders_columns', array(
'order-number' => __( 'Order', 'woocommerce' ),
'order-date' => __( 'Date', 'woocommerce' ),
'order-status' => __( 'Status', 'woocommerce' ),
'order-total' => __( 'Total', 'woocommerce' ),
'order-actions' => ' ',
) );
// Deprecated filter since 2.6.0.
return apply_filters( 'woocommerce_my_account_my_orders_columns', $columns );
}