ims_sales_csv_query

Description

The “ims_sales_csv_query” filter is used to modify the MySQL select query used to create the customer csv file.

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

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

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

Example

// Apply filter
function modify_ims_sales_csv_query( $query ) {
	global $wpdb; 
	return $wpdb->prepare( "SELECT * FROM $wpdb->posts WHERE post_type = 'ims_order' " ); //create a custom query
}
add_filter('ims_sales_csv_query', 'modify_ims_sales_csv_query');

Note:  $query is an MySQL query string.


Leave a Reply

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