woocommerce_analytics_clauses_(type)
Filter SQL clauses by type and context.
Usage
add_filter( 'woocommerce_analytics_clauses_(type)', 'wp_kama_woocommerce_analytics_clauses_type_filter', 10, 2 );
/**
* Function for `woocommerce_analytics_clauses_(type)` filter-hook.
*
* @param array $clauses The original arguments for the request.
* @param string $context The data store context.
*
* @return array
*/
function wp_kama_woocommerce_analytics_clauses_type_filter( $clauses, $context ){
// filter...
return $clauses;
}
- $clauses(array)
- The original arguments for the request.
- $context(string)
- The data store context.
Where the hook is called
woocommerce_analytics_clauses_(type)
woocommerce/src/Admin/API/Reports/SqlQuery.php 115
$clauses = apply_filters( "woocommerce_analytics_clauses_{$type}", $clauses, $this->context );