Last active
October 28, 2019 23:43
-
-
Save joshfeck/a4d95889cf4b9bfbe8d09e9eb9d8f590 to your computer and use it in GitHub Desktop.
Remove database row labels from Regsitrations report CSV column headings
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function ee_remove_db_labels_from_csv_column_headings( | |
$reg_csv_array, | |
$reg_row | |
) { | |
foreach ($reg_csv_array as $key => $value) { | |
unset($reg_csv_array[$key]); | |
$new_key = preg_replace('/\[[^\]]*]/', '', $key); | |
$reg_csv_array[$new_key] = $value; | |
} | |
return $reg_csv_array; | |
} | |
add_filter( | |
'FHEE__EventEspressoBatchRequest__JobHandlers__RegistrationsReport__reg_csv_array', | |
'ee_remove_db_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