Automattic\WooCommerce\Admin

ReportCSVExporter::send_headers │ public │ WC 11.2.0

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.

Метод класса: ReportCSVExporter{}

Хуков нет.

Возвращает

void. Ничего (null).

Использование

$ReportCSVExporter = new ReportCSVExporter();
$ReportCSVExporter->send_headers();

Список изменений

С версии 11.2.0 Введена.

Код ReportCSVExporter::send_headers() WC 11.3.0

public function send_headers() {
	parent::send_headers();

	if ( '' !== $this->download_suffix ) {
		header( 'Content-Disposition: attachment; filename=' . $this->get_download_filename() );
	}
}