WC_Admin_List_Table_Products::define_sortable_columns()publicWC 1.0

Define which columns are sortable.

Method of the class: WC_Admin_List_Table_Products{}

No Hooks.

Return

Array.

Usage

$WC_Admin_List_Table_Products = new WC_Admin_List_Table_Products();
$WC_Admin_List_Table_Products->define_sortable_columns( $columns );
$columns(array) (required)
Existing columns.

WC_Admin_List_Table_Products::define_sortable_columns() code WC 9.3.3

public function define_sortable_columns( $columns ) {
	$custom = array(
		'price' => 'price',
		'sku'   => 'sku',
		'name'  => 'title',
	);
	return wp_parse_args( $custom, $columns );
}