woocommerce_orders_table_query_sql
Filters the completed SQL query.
Usage
add_filter( 'woocommerce_orders_table_query_sql', 'wp_kama_woocommerce_orders_table_query_sql_filter' ); /** * Function for `woocommerce_orders_table_query_sql` filter-hook. * * @param string $sql The complete SQL query. * * @return string */ function wp_kama_woocommerce_orders_table_query_sql_filter( $sql ){ // filter... return $sql; }
- $sql(string)
- The complete SQL query.
Changelog
Since 7.9.0 | Introduced. |
Where the hook is called
woocommerce_orders_table_query_sql
woocommerce/src/Internal/DataStores/Orders/OrdersTableQuery.php 906
$this->sql = apply_filters_ref_array( 'woocommerce_orders_table_query_sql', array( $this->sql, &$this, $this->args ) );