woocommerce_orders_table_query_count_sql filter-hookWC 8.6.0

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

OrdersTableQuery::build_count_query()
woocommerce_orders_table_query_count_sql
woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php 938
$this->count_sql = apply_filters_ref_array( 'woocommerce_orders_table_query_count_sql', array( $this->count_sql, &$this, $this->args, $fields, $join, $where, $groupby ) );

Where the hook is used in WooCommerce

Usage not found.