Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active October 19, 2022 20:37
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 Pebblo/7177b8175241427913fb8fa426867e63 to your computer and use it in GitHub Desktop.
Save Pebblo/7177b8175241427913fb8fa426867e63 to your computer and use it in GitHub Desktop.
This function sets the Registration CSV report to only export primary registrants.
<?php //Please do not include the opening PHP tag if you already have one
function tw_ee_only_export_primary_registrants($reg_csv_array, $reg_row) {
//Only export the primary registrants
if( $reg_row['Registration.REG_count'] !== '1' ) {
return array();
}
//Include the REG_Group_Size column so you can see how many tickets purchased.
$reg_csv_array['Group Size'] = $reg_row['Registration.REG_group_size'];
return $reg_csv_array;
}
add_filter( 'FHEE__EventEspressoBatchRequest__JobHandlers__RegistrationsReport__reg_csv_array', 'tw_ee_only_export_primary_registrants', 100, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment