woocommerce_order_table_search_query_meta_keys
Controls the order meta keys to be included in search queries.
This hook is used when Custom Order Tables are in use: the corresponding hook when CPT-orders are in use is woocommerce_shop_order_search_fields.
Usage
add_filter( 'woocommerce_order_table_search_query_meta_keys', 'wp_kama_woocommerce_order_table_search_query_meta_keys_filter' ); /** * Function for `woocommerce_order_table_search_query_meta_keys` filter-hook. * * @param array $array * * @return array */ function wp_kama_woocommerce_order_table_search_query_meta_keys_filter( $array ){ // filter... return $array; }
- $array(array)
- -
Changelog
Since 7.0.0 | Introduced. |
Where the hook is called
woocommerce_order_table_search_query_meta_keys
woocommerce/src/Internal/DataStores/Orders/OrdersTableSearchQuery.php 122-128
$meta_keys = apply_filters( 'woocommerce_order_table_search_query_meta_keys', array( '_billing_address_index', '_shipping_address_index', ) );