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.
Использование
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 $meta_fields_to_search * * @return array */ function wp_kama_woocommerce_order_table_search_query_meta_keys_filter( $meta_fields_to_search ){ // filter... return $meta_fields_to_search; }
- $meta_fields_to_search(массив)
- -
Список изменений
С версии 7.0.0 | Введена. |
Где вызывается хук
woocommerce_order_table_search_query_meta_keys
woocommerce/src/Internal/DataStores/Orders/OrdersTableSearchQuery.php 358-361
$meta_keys = apply_filters( 'woocommerce_order_table_search_query_meta_keys', $meta_fields_to_search );