woocommerce_orders_table_query_count_sql
Filters the count SQL query.
Usage
add_filter( 'woocommerce_orders_table_query_count_sql', 'wp_kama_woocommerce_orders_table_query_count_sql_filter' );
/**
* Function for `woocommerce_orders_table_query_count_sql` filter-hook.
*
* @param string $sql The count SQL query.
*
* @return string
*/
function wp_kama_woocommerce_orders_table_query_count_sql_filter( $sql ){
// filter...
return $sql;
}
- $sql(string)
- The count SQL query.
Changelog
| Since 8.6.0 | Introduced. |
Where the hook is called
woocommerce_orders_table_query_count_sql
woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php 952
$this->count_sql = apply_filters_ref_array( 'woocommerce_orders_table_query_count_sql', array( $this->count_sql, &$this, $this->args, $fields, $join, $where, $groupby ) );