woocommerce_analytics_products_stats_select_query хук-фильтрWC 1.0

Использование

add_filter( 'woocommerce_analytics_products_stats_select_query', 'wp_kama_woocommerce_analytics_products_stats_select_query_filter', 10, 2 );

/**
 * Function for `woocommerce_analytics_products_stats_select_query` filter-hook.
 * 
 * @param  $results 
 * @param  $args    
 *
 * @return 
 */
function wp_kama_woocommerce_analytics_products_stats_select_query_filter( $results, $args ){

	// filter...
	return $results;
}
$results
-
$args
-

Где вызывается хук

Query::get_data()
woocommerce/src/Admin/API/Reports/Products/Stats/Query.php 47
return apply_filters( 'woocommerce_analytics_products_stats_select_query', $results, $args );

Где используется хук в WooCommerce

woocommerce/src/Admin/API/Reports/Products/Stats/Controller.php 51
add_filter( 'woocommerce_analytics_products_stats_select_query', array( $this, 'set_default_report_data' ) );