Automattic\WooCommerce\Admin\API\Reports

DataStore::get_fields()protectedWC 1.0

Returns a comma separated list of the fields in the query_args, if there aren't, returns report_columns keys.

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

Хуков нет.

Возвращает

Массив.

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

// protected - в коде основоного (родительского) или дочернего класса
$result = $this->get_fields( $query_args );
$query_args(массив) (обязательный)
Parameters supplied by the user.

Код DataStore::get_fields() WC 8.7.0

protected function get_fields( $query_args ) {
	if ( isset( $query_args['fields'] ) && is_array( $query_args['fields'] ) ) {
		return $query_args['fields'];
	}
	return array_keys( $this->report_columns );
}