Automattic\WooCommerce\Admin
ReportCSVExporter::send_headers
Set the export headers.
Re-sends the parent's Content-Disposition so the download is named after what the report covers, leaving the stored file's name alone.
Method of the class: ReportCSVExporter{}
No Hooks.
Returns
void. Nothing (null).
Usage
$ReportCSVExporter = new ReportCSVExporter(); $ReportCSVExporter->send_headers();
Changelog
| Since 11.2.0 | Introduced. |
ReportCSVExporter::send_headers() ReportCSVExporter::send headers code WC 11.2.1
public function send_headers() {
parent::send_headers();
if ( '' !== $this->download_suffix ) {
header( 'Content-Disposition: attachment; filename=' . $this->get_download_filename() );
}
}