Skip to content

Instantly share code, notes, and snippets.

@kjohnson
Created April 20, 2015 20:46
Show Gist options
  • Select an option

  • Save kjohnson/6672ecf4bb96bde81a55 to your computer and use it in GitHub Desktop.

Select an option

Save kjohnson/6672ecf4bb96bde81a55 to your computer and use it in GitHub Desktop.
rename a csv email attachment
<?php
add_filter( 'ninja_forms_submission_csv_name', 'my_unique_csv_name', 10, 1 );
function my_unique_csv_name( $csv_name ) {
global $ninja_forms_processing;
return $ninja_forms_processing->get_form_setting( 'sub_id' ). "_" . $csv_name;
}
@EkDor
Copy link

EkDor commented Jun 30, 2015

Is this unto date? The only thing I can get it to do is add the sub_id and underscore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment