WordPress at a glance
function is not described


ReportExporter::export_report() public WC 1.0

Process a report export action.

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

No Hooks.


null. Nothing.


$result = ReportExporter::export_report( $page_number, $export_id, $report_type, $report_args );
$page_number(int) (required)
Page number for this action.
$export_id(string) (required)
Unique ID for report (timestamp expected).
$report_type(string) (required)
Report type. E.g. 'customers'.
$report_args(array) (required)
Report parameters, passed to data query.

Code of ReportExporter::export_report() WC 5.3.0

public static function export_report( $page_number, $export_id, $report_type, $report_args ) {
	$report_args['page'] = $page_number;

	$exporter = new ReportCSVExporter( $report_type, $report_args );
	$exporter->set_filename( "wc-{$report_type}-report-export-{$export_id}" );

	self::update_export_percentage_complete( $report_type, $export_id, $exporter->get_percent_complete() );