WordPress at a glance
function is not described

Automattic\WooCommerce\Admin

ReportCSVExporter::get_report_columns() protected WC 1.0

Get the report columns from the controller.

{} It's a method of the class: ReportCSVExporter{}

No Hooks.

Return

Array. Array of report column names.

Usage

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

Code of ReportCSVExporter::get_report_columns() WC 5.3.0

<?php
protected function get_report_columns() {
	// Default to the report's defined export columns.
	if ( $this->controller instanceof ExportableInterface ) {
		return $this->controller->get_export_columns();
	}

	// Fallback to generating columns from the report schema.
	$report_columns = array();
	$report_schema  = $this->controller->get_item_schema();

	if ( isset( $report_schema['properties'] ) ) {
		foreach ( $report_schema['properties'] as $column_name => $column_info ) {
			// Expand extended info columns into export.
			if ( 'extended_info' === $column_name ) {
				// Remove columns with questionable CSV values, like markup.
				$extended_info  = array_diff( array_keys( $column_info ), array( 'image' ) );
				$report_columns = array_merge( $report_columns, $extended_info );
			} else {
				$report_columns[] = $column_name;
			}
		}
	}

	return $report_columns;
}