Automattic\WooCommerce\Internal\Admin\ProductReviews

ReviewsListTable::get_sortable_columns()protectedWC 1.0

Gets a list of sortable columns.

Key is the column ID and value is which database column we perform the sorting on. The rating column uses a unique key instead, as that requires sorting by meta value.

Метод класса: ReviewsListTable{}

No Hooks.

Return

Array.

Usage

// protected - for code of main (parent) or child class
$result = $this->get_sortable_columns() : array;

Code of ReviewsListTable::get_sortable_columns() WC 7.1.0

protected function get_sortable_columns() : array {
	return [
		'author'   => 'comment_author',
		'response' => 'comment_post_ID',
		'date'     => 'comment_date_gmt',
		'type'     => 'comment_type',
		'rating'   => 'rating',
	];
}