woocommerce_analytics_products_query_args
Deprecated from version 9.3.0. It is no longer supported and can be removed in future releases. Use
GenericQuery or \WC_Object_Query
instead.Get product data based on the current query vars.
Usage
add_filter( 'woocommerce_analytics_products_query_args', 'wp_kama_woocommerce_analytics_products_query_args_filter' ); /** * Function for `woocommerce_analytics_products_query_args` filter-hook. * * @param $query_vars * * @return */ function wp_kama_woocommerce_analytics_products_query_args_filter( $query_vars ){ // filter... return $query_vars; }
- $query_vars
- -
Changelog
Deprecated since 9.3.0 | Products\Query class is deprecated, please use GenericQuery or \WC_Object_Query instead. |
Where the hook is called
woocommerce_analytics_products_query_args
woocommerce/src/Admin/API/Reports/Products/Query.php 49
$args = apply_filters( 'woocommerce_analytics_products_query_args', $this->get_query_vars() );
woocommerce/src/Admin/API/Leaderboards.php 312-322
apply_filters( 'woocommerce_analytics_products_query_args', array( 'orderby' => 'items_sold', 'order' => 'desc', 'after' => $after, 'before' => $before, 'per_page' => $per_page, 'extended_info' => true, ) )