woocommerce_analytics_(context)_query_args filter-hookWC 9.3.0

Called before the data is fetched.

Usage

add_filter( 'woocommerce_analytics_(context)_query_args', 'wp_kama_woocommerce_analytics_context_query_args_filter' );

/**
 * Function for `woocommerce_analytics_(context)_query_args` filter-hook.
 * 
 * @param array $query_args Query parameters.
 *
 * @return array
 */
function wp_kama_woocommerce_analytics_context_query_args_filter( $query_args ){

	// filter...
	return $query_args;
}
$query_args(array)
Query parameters.

Changelog

Since 9.3.0 Introduced.

Where the hook is called

In file: /src/Admin/API/Reports/FilteredGetDataTrait.php
woocommerce_analytics_(context)_query_args
woocommerce/src/Admin/API/Reports/FilteredGetDataTrait.php 47
$args    = apply_filters( "woocommerce_analytics_{$this->context}_query_args", $query_args );

Where the hook is used in WooCommerce

Usage not found.