Automattic\WooCommerce\Admin

ReportCSVExporter::export_file_exists │ public │ WC 11.2.0

Check whether a complete generated export is still on disk.

The .headers companion is only written once the export reaches 100%, so a body without one is an export that never finished and must not be served.

Method of the class: ReportCSVExporter{}

No Hooks.

Returns

bool.

Usage

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

Changelog

Since 11.2.0 Introduced.

ReportCSVExporter::export_file_exists() code WC 11.2.1

public function export_file_exists() {
	return file_exists( $this->get_file_path() ) && file_exists( $this->get_headers_row_file_path() );
}