WC_Admin_List_Table_Products::define_sortable_columns()publicWC 1.0

Define which columns are sortable.

{} It's a 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.

Code of WC_Admin_List_Table_Products::define_sortable_columns() WC 6.7.0

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