woocommerce_before_(order_type)_list_table_view_links
Filters the list of available list table view links before the actual query runs. This can be used to, e.g., remove counts from the links.
Использование
add_filter( 'woocommerce_before_(order_type)_list_table_view_links', 'wp_kama_woocommerce_before_order_type_list_table_view_links_filter' ); /** * Function for `woocommerce_before_(order_type)_list_table_view_links` filter-hook. * * @param string[] $views An array of available list table view links. * * @return string[] */ function wp_kama_woocommerce_before_order_type_list_table_view_links_filter( $views ){ // filter... return $views; }
- $views(string[])
- An array of available list table view links.
Список изменений
С версии 8.6.0 | Введена. |
Где вызывается хук
woocommerce_before_(order_type)_list_table_view_links
woocommerce/src/Internal/Admin/Orders/ListTable.php 559
$view_links = apply_filters( 'woocommerce_before_' . $this->order_type . '_list_table_view_links', $view_links );