WC_CSV_Exporter::export_row( array $row_data, string $key, resource $buffer )
Export rows to an array ready for the CSV.
Description Description
Parameters Parameters
- $row_data
-
(Required) Data to export.
- $key
-
(Required) Column being exported.
- $buffer
-
(Required) Output buffer.
Source Source
File: includes/export/abstract-wc-csv-exporter.php
protected function export_row( $row_data, $key, $buffer ) { $columns = $this->get_column_names(); $export_row = array(); foreach ( $columns as $column_id => $column_name ) { if ( ! $this->is_column_exporting( $column_id ) ) { continue; } if ( isset( $row_data[ $column_id ] ) ) { $export_row[] = $this->format_data( $row_data[ $column_id ] ); } else { $export_row[] = ''; } } $this->fputcsv( $buffer, $export_row ); ++ $this->exported_row_count; }
Changelog Changelog
Version | Description |
---|---|
3.1.0 | Introduced. |