WC_CSV_Batch_Exporter::generate_file
Generate the CSV file.
Метод класса: WC_CSV_Batch_Exporter{}
Хуков нет.
Возвращает
bool. Whether the page's data was written to the file.
Использование
$WC_CSV_Batch_Exporter = new WC_CSV_Batch_Exporter(); $WC_CSV_Batch_Exporter->generate_file();
Список изменений
| С версии 3.1.0 | Введена. |
Код WC_CSV_Batch_Exporter::generate_file() WC CSV Batch Exporter::generate file WC 11.3.0
public function generate_file() {
if ( 1 === $this->get_page() ) {
if ( file_exists( $this->get_file_path() ) ) {
wp_delete_file( $this->get_file_path() );
}
// We need to initialize the file here.
$this->get_file();
}
$this->prepare_data_to_export();
return $this->write_csv_data( $this->get_csv_data() );
}