WC_CSV_Batch_Exporter::export()publicWC 3.1.0

Serve the file and remove once sent to the client.

Method of the class: WC_CSV_Batch_Exporter{}

No Hooks.

Return

null. Nothing (null).

Usage

$WC_CSV_Batch_Exporter = new WC_CSV_Batch_Exporter();
$WC_CSV_Batch_Exporter->export();

Changelog

Since 3.1.0 Introduced.

WC_CSV_Batch_Exporter::export() code WC 8.7.0

public function export() {
	$this->send_headers();
	$this->send_content( $this->get_headers_row_file() . $this->get_file() );
	@unlink( $this->get_file_path() ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_unlink, Generic.PHP.NoSilencedErrors.Discouraged
	@unlink( $this->get_headers_row_file_path() ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_unlink, Generic.PHP.NoSilencedErrors.Discouraged
	die();
}