Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active September 3, 2020 20:48
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/4910bcbd1da0819a9f1e712e62a5c5bb to your computer and use it in GitHub Desktop.
Save Pebblo/4910bcbd1da0819a9f1e712e62a5c5bb to your computer and use it in GitHub Desktop.
Add a 'Finalize Registration Step' to the registration report, if the user completed the finalize registration step the field will show 'Complete', otherwise it will show 'Incomplete.
<?php //Please do not include the opening PHP tag if you already have one
function ee_tw_reg_step_status_to_csv( $reg_csv_array, $reg_row ) {
$transaction_reg_steps = unserialize( $reg_row['TransactionTable.TXN_reg_steps'] );
$reg_csv_array['Finalize Registration Step'] = '';
if( isset($transaction_reg_steps['finalize_registration']) ) {
$reg_csv_array['Finalize Registration Step'] = $transaction_reg_steps['finalize_registration'] == TRUE ? 'Complete' : 'Incomplete';
}
return $reg_csv_array;
}
add_filter( 'FHEE__EventEspressoBatchRequest__JobHandlers__RegistrationsReport__reg_csv_array', 'ee_tw_reg_step_status_to_csv', 10, 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment