woocommerce_reports_get_order_report_data

The WooCommerce woocommerce reports get order report data hook.

Description

apply_filters( 'woocommerce_reports_get_order_report_data', (unknown) $wpdb_query_type_query, (unknown) $data ); 

Parameters (2)

0. $wpdb_query_type_query (unknown)
The wpdb query type query.
1. $data (unknown)
The data.

Usage

To run the hook, copy the example below.
  1. $wpdb_query_type_query = apply_filters( 'woocommerce_reports_get_order_report_data', $wpdb_query_type_query, $data ); 
  2.  
  3. if ( !empty( $wpdb_query_type_query ) ) { 
  4.  
  5. // everything has led up to this point... 
  6.  
  7.  
The following example is for adding a hook callback.
  1. // define the woocommerce_reports_get_order_report_data callback 
  2. function filter_woocommerce_reports_get_order_report_data( $wpdb_query_type_query, $data ) { 
  3. // make filter magic happen here... 
  4. return $wpdb_query_type_query
  5. }; 
  6.  
  7. // add the filter 
  8. add_filter( 'woocommerce_reports_get_order_report_data', 'filter_woocommerce_reports_get_order_report_data', 10, 2 ); 
To remove a hook callback, use the example below.
  1. // remove the filter 
  2. remove_filter( 'woocommerce_reports_get_order_report_data', 'filter_woocommerce_reports_get_order_report_data', 10, 2 ); 

Defined (1)

The filter is defined in the following location(s).

/includes/admin/reports/class-wc-admin-report.php  
  1. $cached_results[ $query_hash ] = apply_filters( 'woocommerce_reports_get_order_report_data', $wpdb->$query_type( $query ), $data );