Skip to content
Docs
Get RestroPress

Filter

rpress_payments_export_filename

Updated
On this page

Filters the file name of the payments CSV export.

Runs when the payments CSV export sends its download headers. The value has no extension; .csv is appended afterwards. The default combines the export type with the month and year posted by the export form.

Parameters#

ParameterTypeDescription
$filenamestringDefault name: rpress-export-payments-{month}-{year}.

Return value#

string. The file name without the .csv extension.

Example#

function my_payments_export_filename( $filename ) {
	return $filename . '-' . gmdate( 'Ymd' );
}
add_filter( 'rpress_payments_export_filename', 'my_payments_export_filename', 10, 1 );

Source#

Applied in:

  • includes/admin/reporting/class-export-payments.php (line 41), in RPRESS_Payments_Export::headers()

See also#

Was this page helpful?