Tweak - Order number to be sortable column

CC @mikejolley
This commit is contained in:
Shiva Poudel 2017-11-05 21:37:42 +05:45
parent 0a77632a33
commit aeb07b5fd8
4 changed files with 9 additions and 9 deletions

View File

@ -89,7 +89,7 @@ abstract class WC_Admin_List_Table {
* it, so we want to hide the useless UI from the screen options tab.
*
* @param array $post_types Array of post types supporting view mode.
* @return array Array of post types supporting view mode, without products, orders, and coupons.
* @return array Array of post types supporting view mode, without this type.
*/
public function disable_view_mode( $post_types ) {
unset( $post_types[ $this->list_table_type ] );
@ -192,7 +192,7 @@ abstract class WC_Admin_List_Table {
}
/**
* Define primary column;
* Define primary column.
*
* @return array
*/

View File

@ -52,7 +52,7 @@ class WC_Admin_List_Table_Coupons extends WC_Admin_List_Table {
}
/**
* Define primary column;
* Define primary column.
*
* @return array
*/

View File

@ -56,7 +56,7 @@ class WC_Admin_List_Table_Orders extends WC_Admin_List_Table {
}
/**
* Define primary column;
* Define primary column.
*
* @return array
*/
@ -95,9 +95,9 @@ class WC_Admin_List_Table_Orders extends WC_Admin_List_Table {
*/
public function define_sortable_columns( $columns ) {
$custom = array(
'order_title' => 'ID',
'order_total' => 'order_total',
'order_date' => 'date',
'order_number' => 'ID',
'order_total' => 'order_total',
'order_date' => 'date',
);
unset( $columns['comments'] );
@ -414,7 +414,7 @@ class WC_Admin_List_Table_Orders extends WC_Admin_List_Table {
}
$redirect_to = add_query_arg( array(
'post_type' => 'shop_order',
'post_type' => $this->list_table_type,
$report_action => true,
'changed' => $changed,
'ids' => join( ',', $ids ),

View File

@ -56,7 +56,7 @@ class WC_Admin_List_Table_Products extends WC_Admin_List_Table {
}
/**
* Define primary column;
* Define primary column.
*
* @return array
*/