The “ims_sales_csv_columns” filter is used to add or remove columns from the downloadable sales csv file.

A plugin (or theme) can modify the array with the code:

<?php add_filter( 'ims_sales_csv_columns', 'filter_function_name' ); ?>

The hook is located in the image-store/admin/sales/sales_csv.php file.


// Apply filter
function add_ims_sales_csv_columns( $columns ) {
	return array_merge( array('sale_id' => __('Sale ID')), $columns );
add_filter('ims_sales_csv_columns', 'add_ims_sales_csv_columns');

Note:  $columns is an associative array.

Leave a Reply

Your email address will not be published. Required fields are marked *