Posted: May 20, 2014 at 9:39 pm
|
Weird issue… When an attendee cancels registration for an event, their name still appears in the attendee list. |
|
Hi, That’s correct. They remain there but their status is changed to cancelled. It used to be a case where they were simply deleted from the database, but many users deemed this as a bad idea so we changed it. |
|
I’d like to either hide the cancelled names from the attendee list or delete them like you mentioned used to be the case with previous versions of EE. Can you help me with that? |
|
Hi, There isn’t a way to do this, barring changing core code (and honestly it is beyond me how). I do though I agree that they should be hidden from view much like deleted users. I’ll put forward a feature request for this, though I cannot guarantee it will be included in future versions. |
|
Ugh… That’s not going to go over well with my client. Since it was previously that way, wouldn’t someone around there possibly know how to make it happen? Sorry to be a pest! |
Hi Trevis, We’ve been looking into this and are looking to add a filter to the SQL query which will allow you to exclude attendees based on their Payment Status (only when no Payment Status has been selected within the filters) we are currently testing an implementation of this within the next version of Event Espresso. I can provide you with details of how try this if you would like to test it? A note beforehand, the filter used may change before release so any current fix given may need updating when we update EE (basically just changing the hook you use in the function) If your happy with that we can provide some more details. |
|
|
That would be great! |
|
If you’ll go into includes/event-management/queries.php and find line 190: $SQL .= ! $count && $attendees && $payment_status ? ' AND a.payment_status = "' . $payment_status . '"' : ''; after that line, include this code on lines 191-192. // Filter to allow the user to excluded attendees based on payment status within the default attendee report if (!$count && $attendees && !$payment_status) { $SQL .= apply_filters('espresso_attendee_report_payment_status_where', ''); } That is the core code modification that should be coming in 3.1.37. Now you’ll need to add the code: add_filter('espresso_attendee_report_payment_status_where', 'espresso_exclude_cancelled_payment_status'); function espresso_exclude_cancelled_payment_status() { return ' AND a.payment_status != "Cancelled"'; } Somewhere WordPress will see it, in the theme’s functions.php file, in uploads/espresso/custom_functions.php, or in a custom functions plugin file.
|
Just too add, Sidney mentioned replacing line 190 with the example given. However if you replace that line the ‘Payment status’ filter for the attendees will no longer function. Rather than replacing line 190, add the code Sidney proved to line 191-192. So something similar to this – http://take.ms/igNvk This will allow the filter to function normally and the custom function to hook into the default behaviour. As to not cause future confusion I have amended Sidney’s post to add the code after line 190, rather than replacing line 190. |
|
|
Thanks guys, it’s almost working! After adding (not replacing) the code provided, the cancelled attendee is now hidden from the “Attendee Reports” on the dashboard side but, anywhere I reference the attendee list on the user side of the site, the cancelled registrant still appears there. Is there a way to also hide it in those spots? |
This fix will only apply to the admin. So this is also when displaying the attendees using [LISTATTENDEES], is that correct? If so you could set the paid_only attribute to true. Using: [LISTATTENDEES paid_only=”true”] This will only then display attendees with a status of Completed, Pending or Refund. Does that help? |
|
|
That did the trick—thank you! |
The support post ‘Cancelled Registrations Still Appearing in Attendee List’ 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.