experimental_woocommerce_analytics_variations_additional_clauses
Experimental: Filter the Variations SQL query allowing extensions to add additional SQL clauses.
Usage
add_filter( 'experimental_woocommerce_analytics_variations_additional_clauses', 'wp_kama_experimental_woocommerce_analytics_variations_additional_clauses_filter', 10, 2 ); /** * Function for `experimental_woocommerce_analytics_variations_additional_clauses` filter-hook. * * @param array $query_args Query parameters. * @param SqlQuery $subquery Variations query class. * * @return array */ function wp_kama_experimental_woocommerce_analytics_variations_additional_clauses_filter( $query_args, $subquery ){ // filter... return $query_args; }
- $query_args(array)
- Query parameters.
- $subquery(SqlQuery)
- Variations query class.
Changelog
Since 7.4.0 | Introduced. |
Where the hook is called
woocommerce/src/Admin/API/Reports/Variations/DataStore.php 472
apply_filters( 'experimental_woocommerce_analytics_variations_additional_clauses', $query_args, $this->subquery );