Automattic\WooCommerce\Admin
ReportCSVExporter::stream_export_file
Write the export to the output, leaving the file in place. Send the download headers first.
Метод класса: ReportCSVExporter{}
Хуков нет.
Возвращает
void. Ничего (null).
Использование
$ReportCSVExporter = new ReportCSVExporter(); $ReportCSVExporter->stream_export_file();
Список изменений
| С версии 11.2.0 | Введена. |
Код ReportCSVExporter::stream_export_file() ReportCSVExporter::stream export file WC 11.3.0
public function stream_export_file() {
$this->send_content( $this->get_headers_row_file() );
// Stream the body instead of reading it into memory. Exports are emailed precisely when the
// report is too large to return in one request, so it can be far larger than the memory limit.
readfile( $this->get_file_path() ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_operations_readfile, WordPress.Security.EscapeOutput.OutputNotEscaped -- Streaming a generated CSV download.
}