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{}

Хуков нет.

Возвращает

Массив.

Использование

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_sortable_columns() : array;

Код ReviewsListTable::get_sortable_columns() WC 8.7.0

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