We would like to retain canceled registrations for tracking purposes, but yet we don’t want them to show up on a user’s “registered events” page if the status is approved.
Alternatively, is there a way to add a “status” column to the output show it shows the status of the registration? This would be less preferred, since the status will predominantly be “approved” and it will take up additional space; but it would be an acceptable alternative.
There is a way and involves adding a bit of custom PHP code to some custom templates. Here’s how:
1) Set the shortcode on the page to use the “simple_list” template: [ESPRESSO_MY_EVENTS template=simple_list_table]
2) Copy the loop-espresso_my_events-simple_list_table.template.php file from the WP User Integration add-on’s templates folder. You’ll upload the copy into your WordPress theme. See this guide on how to set up a child theme (recommended) https://codex.wordpress.org/Child_Themes
3) Open the copy in a code editor and immediately after this:
if ( ! $object instanceof EE_Registration ) {
continue;
}
Quick question though… by placing the loop.template.php file in the child theme folder, I am essentially superseding the original file, correct? And if that’s true, then if the original file is ever changed through a future update, there is the potential for a conflict, since the superseding file would still be in effect (and the rest of the EE system relying on the updates to the original file might break without those updates). I don’t know how likely it is that the original file will be altered at some point, but it seems conceivable. If so, is there a “best practice” for a non-programmer like myself to keep tabs on those potential future conflicts?
The rest of the Event Espresso system does not rely on that template, but if there’s ever an update to that file (where for example a new feature is added), you’ll do well to merge those changes into your copy. Or make another copy of the updated template and re-add your customization.
Viewing 3 reply threads
The support post ‘Exclude Canceled Registrations from ESPRESSO_MY_EVENTS display, or…’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.