Created
February 13, 2020 23:14
-
-
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.
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__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