woocommerce_reports_get_order_report_query │ filter-hook │ WC 2.1.0

Filters the legacy order report SQL clauses before they are combined into a SQL string.

Usage

add_filter( 'woocommerce_reports_get_order_report_query', 'wp_kama_woocommerce_reports_get_order_report_query_filter' );

/**
 * Function for `woocommerce_reports_get_order_report_query` filter-hook.
 * 
 * @param array $query SQL clauses keyed by select/from/join/where/group_by/order_by/limit.
 *
 * @return array
 */
function wp_kama_woocommerce_reports_get_order_report_query_filter( $query ){
	// filter...
	return $query;
}
$query(array)
SQL clauses keyed by select/from/join/where/group_by/order_by/limit.

Changelog

Since 2.1.0 Introduced.

Where the hook is called

WC_Admin_Report::get_order_report_data()
woocommerce_reports_get_order_report_query
woocommerce/includes/admin/reports/class-wc-admin-report.php 364
$query = apply_filters( 'woocommerce_reports_get_order_report_query', $query );

Where the hook is used in WooCommerce

Usage not found.