WC_CSV_Batch_Exporter::write_csv_data( string $data )
Write data to the file.
Description Description
Parameters Parameters
- $data
-
(Required) Data.
Source Source
File: includes/export/abstract-wc-csv-batch-exporter.php
protected function write_csv_data( $data ) {
$file = $this->get_file();
// Add columns when finished.
if ( 100 === $this->get_percent_complete() ) {
$file = chr( 239 ) . chr( 187 ) . chr( 191 ) . $this->export_column_headers() . $file;
}
$file .= $data;
@file_put_contents( $this->get_file_path(), $file ); // phpcs:ignore WordPress.VIP.FileSystemWritesDisallow.file_ops_file_put_contents, Generic.PHP.NoSilencedErrors.Discouraged, WordPress.WP.AlternativeFunctions.file_system_read_file_put_contents
}
Changelog Changelog
| Version | Description |
|---|---|
| 3.1.0 | Introduced. |