Skip to content
Docs
Get RestroPress

Filter

rpress_customers_export_filename

Updated
On this page

Filters the file name of the customers CSV export.

Runs when the customers CSV export sends its download headers. The value has no extension; .csv is appended afterwards. When the export is limited to a single menu item, the title of that item is part of the default name.

Parameters#

ParameterTypeDescription
$filenamestringDefault name: rpress-export-, the menu item title if any, the export type, then the date as m-d-Y.

Return value#

string. The file name without the .csv extension.

Example#

function my_customers_export_filename( $filename ) {
	return 'mysite-' . $filename;
}
add_filter( 'rpress_customers_export_filename', 'my_customers_export_filename', 10, 1 );

Source#

Applied in:

  • includes/admin/reporting/class-export-customers.php (line 44), in RPRESS_Customers_Export::headers()

See also#

Was this page helpful?