WordPress at Your Fingertips
function is not described

WC_CSV_Exporter::export_column_headers() protected WC 3.1.0

Export column headers in CSV format.

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

No Hooks.

Return

String.

Usage

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

Changelog

Since 3.1.0 Introduced.

Code of WC_CSV_Exporter::export_column_headers() WC 5.9.0

protected function export_column_headers() {
	$columns    = $this->get_column_names();
	$export_row = array();
	$buffer     = fopen( 'php://output', 'w' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fopen
	ob_start();

	foreach ( $columns as $column_id => $column_name ) {
		if ( ! $this->is_column_exporting( $column_id ) ) {
			continue;
		}
		$export_row[] = $this->format_data( $column_name );
	}

	$this->fputcsv( $buffer, $export_row );

	return ob_get_clean();
}