WC_CSV_Exporter::export_rows()
Export rows in CSV format.
Method of the class: WC_CSV_Exporter{}
Hooks from the method
Return
String
.
Usage
// protected - for code of main (parent) or child class $result = $this->export_rows();
Changelog
Since 3.1.0 | Introduced. |
WC_CSV_Exporter::export_rows() WC CSV Exporter::export rows code WC 9.4.2
protected function export_rows() { $data = $this->get_data_to_export(); $buffer = fopen( 'php://output', 'w' ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fopen ob_start(); array_walk( $data, array( $this, 'export_row' ), $buffer ); return apply_filters( "woocommerce_{$this->export_type}_export_rows", ob_get_clean(), $this ); }