WordPress at a glance
function is not described

Automattic\WooCommerce\Admin

ReportExporter::download_export_file() public WC 1.0

Serve the export file.

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

No Hooks.

Return

null. Nothing.

Usage

$result = ReportExporter::download_export_file();

Code of ReportExporter::download_export_file() WC 5.3.0

<?php
public static function download_export_file() {
	// @todo - add nonce? (nonces are good for 24 hours)
	if (
		isset( $_GET['action'] ) &&
		! empty( $_GET['filename'] ) &&
		self::DOWNLOAD_EXPORT_ACTION === wp_unslash( $_GET['action'] ) && // WPCS: input var ok, sanitization ok.
		current_user_can( 'view_woocommerce_reports' )
	) {
		$exporter = new ReportCSVExporter();
		$exporter->set_filename( wp_unslash( $_GET['filename'] ) ); // WPCS: input var ok, sanitization ok.
		$exporter->export();
	}
}