woocommerce_(order_type)_list_table_sortable_columns
Filters the list of sortable columns.
Usage
add_filter( 'woocommerce_(order_type)_list_table_sortable_columns', 'wp_kama_woocommerce_order_type_list_table_sortable_columns_filter' ); /** * Function for `woocommerce_(order_type)_list_table_sortable_columns` filter-hook. * * @param array $sortable_columns List of sortable columns. * * @return array */ function wp_kama_woocommerce_order_type_list_table_sortable_columns_filter( $sortable_columns ){ // filter... return $sortable_columns; }
- $sortable_columns(array)
- List of sortable columns.
Changelog
Since 7.3.0 | Introduced. |
Where the hook is called
woocommerce_(order_type)_list_table_sortable_columns
woocommerce/src/Internal/Admin/Orders/ListTable.php 928-935
return apply_filters( 'woocommerce_' . $this->order_type . '_list_table_sortable_columns', array( 'order_number' => 'ID', 'order_date' => 'date', 'order_total' => 'order_total', ) );