LLMS_Admin_Tool_Limited_Billing_Order_Locator::get_csv_file()
Create a csv “file” via output buffering and return it as a string.
Return Return
(string)
Source Source
File: includes/admin/tools/class-llms-admin-tool-limited-billing-order-locator.php
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 | protected function get_csv_file() { $csv = $this ->get_csv(); // Add header row. array_unshift ( $csv , array ( 'Order ID' , 'Expected Payments' , 'Total Payments' , 'Successful Payments' , 'Refunded Payments' , 'Edit Link' , ) ); // Create the CSV file. ob_start(); $fh = fopen ( 'php://output' , 'w' ); foreach ( $csv as $line ) { fputcsv ( $fh , $line ); } fclose( $fh ); // phpcs:ignore WordPress.WP.AlternativeFunctions.file_system_read_fclose return ob_get_clean(); } |
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
5.3.0 | Introduced. |