Automattic\WooCommerce\Internal\DataStores\Orders
OrdersTableMetaQuery::get_orderby_keys()
Returns a list of names (corresponding to meta_query clauses) that can be used as an 'orderby' arg.
Метод класса: OrdersTableMetaQuery{}
Хуков нет.
Возвращает
Массив
.
Использование
$OrdersTableMetaQuery = new OrdersTableMetaQuery(); $OrdersTableMetaQuery->get_orderby_keys(): array;
Список изменений
С версии 7.4 | Введена. |
Код OrdersTableMetaQuery::get_orderby_keys() OrdersTableMetaQuery::get orderby keys WC 9.3.3
public function get_orderby_keys(): array { if ( ! $this->flattened_clauses ) { return array(); } $keys = array(); $keys[] = 'meta_value'; $keys[] = 'meta_value_num'; $first_clause = reset( $this->flattened_clauses ); if ( $first_clause && ! empty( $first_clause['key'] ) ) { $keys[] = $first_clause['key']; } $keys = array_merge( $keys, array_keys( $this->flattened_clauses ) ); return $keys; }