Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Last active May 1, 2020 18:21
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 joshfeck/c7fd2bfde6e08174f876d2bc3690b8bb to your computer and use it in GitHub Desktop.
Save joshfeck/c7fd2bfde6e08174f876d2bc3690b8bb to your computer and use it in GitHub Desktop.
Removed cancelled registrations from default view. Event Espresso 4 Registrations admin page
<?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