Created
September 11, 2018 21:35
-
-
Save joshfeck/71c0a71619d0fd94897b2af94b533262 to your computer and use it in GitHub Desktop.
Remove registrations with "Cancelled" status. Event Espresso 4
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 | |
add_filter( | |
'FHEE__EE_Export__report_registration_for_event', | |
'my_exclude_cancelled_registrations_csv_report', | |
10, | |
2 | |
); | |
function my_exclude_cancelled_registrations_csv_report( | |
$params, | |
$event_id | |
) { | |
$params = array( | |
array( | |
'OR' => array( | |
'Transaction.STS_ID' => array( | |
'NOT IN', | |
array( | |
\EEM_Transaction::failed_status_code, | |
\EEM_Transaction::abandoned_status_code, | |
), | |
), | |
'STS_ID' => \EEM_Registration::status_id_approved, | |
), | |
'AND' => array( | |
'STS_ID' => array( | |
'NOT IN', | |
array( | |
\EEM_Registration::status_id_cancelled, | |
), | |
), | |
), | |
'Ticket.TKT_deleted' => array('IN', array(true, false)), | |
), | |
'order_by' => array('Transaction.TXN_ID' => 'asc', 'REG_count' => 'asc'), | |
'force_join' => array('Transaction', 'Ticket', 'Attendee'), | |
'caps' => \EEM_Base::caps_read_admin, | |
); | |
return $params; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment