Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created November 14, 2019 23:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joshfeck/e6bd23fc5362041421efac14ab94ad46 to your computer and use it in GitHub Desktop.
Save joshfeck/e6bd23fc5362041421efac14ab94ad46 to your computer and use it in GitHub Desktop.
Remove CSV report column headings. Event Espresso 4
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
function ee_remove_labels_from_csv_column_headings(
$reg_csv_array,
$reg_row
) {
$i = 0;
foreach ($reg_csv_array as $key => $value) {
unset($reg_csv_array[$key]);
$new_key = $i;
$reg_csv_array[$new_key] = $value;
$i++;
}
return $reg_csv_array;
}
add_filter(
'FHEE__EventEspressoBatchRequest__JobHandlers__RegistrationsReport__reg_csv_array',
'ee_remove_labels_from_csv_column_headings',
11,
2
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment