Last active
May 1, 2020 18:21
-
-
Save joshfeck/c7fd2bfde6e08174f876d2bc3690b8bb to your computer and use it in GitHub Desktop.
Removed cancelled registrations from default view. Event Espresso 4 Registrations admin page
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__Registrations_Admin_Page___get_where_conditions_for_registrations_query', | |
'jf_ee_reg_list_table_reg_status_where', | |
11, | |
2 | |
); | |
function jf_ee_reg_list_table_reg_status_where( | |
$where, | |
$request | |
) { | |
// check for reg status on the request | |
if( empty( $request['_reg_status'] ) ) { | |
if(isset($request['status'])&& $request['status'] !== 'trash') { | |
// Add the cancelled reg status to the where conditions | |
$where['STS_ID'] = array('NOT_IN', array('RIC', 'RCN')); | |
} | |
} | |
return $where; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment