Skip to content

Instantly share code, notes, and snippets.

@joshfeck
Created February 13, 2020 23:14
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/7615cf58377ddb6da5f8dafe903b3c68 to your computer and use it in GitHub Desktop.
Save joshfeck/7615cf58377ddb6da5f8dafe903b3c68 to your computer and use it in GitHub Desktop.
Change [ESPRESSO_MY_EVENTS template=simple_list_table] shortcode output to display only approved registrations. EE4 + WPUser integration.
<?php
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file
add_filter(
'FHEE__Espresso_My_Events__getTemplateObjects__query_args',
'jf_ee_filter_my_events_approved_regs',
10,
3
);
function jf_ee_filter_my_events_approved_regs(
$query_args,
$template_args,
$att_id
) {
if ($template_args['object_type'] === 'Registration') {
$query_args[0]['STS_ID'] = EEM_Registration::status_id_approved;
}
return $query_args;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment