Automattic\WooCommerce\Internal\Admin\Logging\FileV2
FileExporter::send_headers
Send HTTP headers at the beginning of a file.
Modeled on WC_CSV_Exporter::send_headers().
Method of the class: FileExporter{}
No Hooks.
Returns
null. Nothing (null).
Usage
// private - for code of main (parent) class only $result = $this->send_headers(): void;
FileExporter::send_headers() FileExporter::send headers code WC 10.8.1
private function send_headers(): void {
header( 'Content-Type: text/plain; charset=utf-8' );
header( 'Content-Disposition: attachment; filename=' . $this->get_filename() );
header( 'Pragma: no-cache' );
header( 'Expires: 0' );
}