Automattic\WooCommerce\Admin
ReportCSVExporter::set_download_suffix
Add detail to the name the export is downloaded as, leaving the stored file's name alone.
Lets a download say what the report covers, such as the date range, when the stored name only identifies the export.
Method of the class: ReportCSVExporter{}
No Hooks.
Returns
void. Nothing (null).
Usage
$ReportCSVExporter = new ReportCSVExporter(); $ReportCSVExporter->set_download_suffix( $suffix );
- $suffix(string) (required)
- Detail to append to the download's name, e.g. a date range.
Changelog
| Since 11.2.0 | Introduced. |
ReportCSVExporter::set_download_suffix() ReportCSVExporter::set download suffix code WC 11.2.1
public function set_download_suffix( $suffix ) {
$this->download_suffix = sanitize_file_name( $suffix );
}