Skip to content
Docs
Get RestroPress

Filter

rpress_earnings_report_export_filename

Updated
On this page

Filters the file name of the earnings report batch export.

Runs when the earnings report batch export sends its download headers. The value has no extension; .csv is appended afterwards. The default combines the export type with the current month and year.

Parameters#

ParameterTypeDescription
$filenamestringDefault name: rpress-export-earnings_report-{m}-{Y}.

Return value#

string. The file name without the .csv extension.

Example#

function my_earnings_report_filename( $filename ) {
	return 'store-' . $filename;
}
add_filter( 'rpress_earnings_report_export_filename', 'my_earnings_report_filename', 10, 1 );

Source#

Applied in:

  • includes/admin/reporting/export/class-batch-export-earnings-report.php (line 43), in RPRESS_Batch_Earnings_Report_Export::headers()

See also#

Was this page helpful?