woocommerce_orders_table_datastore_get_orders_query
Filter the query args before executing the query.
Usage
add_filter( 'woocommerce_orders_table_datastore_get_orders_query', 'wp_kama_woocommerce_orders_table_datastore_get_query_filter', 10, 2 );
/**
* Function for `woocommerce_orders_table_datastore_get_orders_query` filter-hook.
*
* @param array $query_vars The query vars.
* @param $that
*
* @return array
*/
function wp_kama_woocommerce_orders_table_datastore_get_query_filter( $query_vars, $that ){
// filter...
return $query_vars;
}
- $query_vars(array)
- The query vars.
- $that
- -
Changelog
| Since 10.4.0 | Introduced. |
Where the hook is called
woocommerce_orders_table_datastore_get_orders_query
woocommerce/src/Internal/DataStores/Orders/OrdersTableDataStore.php 3165
$query_vars = apply_filters( 'woocommerce_orders_table_datastore_get_orders_query', $query_vars, $this );