Support

Home Forums Event Espresso Premium Cancelled Registrations Still Appearing in Attendee List

Cancelled Registrations Still Appearing in Attendee List

Posted: May 20, 2014 at 9:39 pm

Viewing 10 reply threads


Trevis

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.


Dean

May 21, 2014 at 1:50 am

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.


Trevis

May 21, 2014 at 11:22 am

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?


Dean

May 23, 2014 at 6:28 am

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.


Trevis

May 23, 2014 at 7:23 am

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!


Tony

  • Support Staff

May 23, 2014 at 12:33 pm

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.


Trevis

May 25, 2014 at 12:04 pm

That would be great!


Sidney Harrell

May 26, 2014 at 2:39 pm

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.

  • This reply was modified 10 years, 6 months ago by Tony. Reason: Include code rather than replace


Tony

  • Support Staff

May 27, 2014 at 6:22 am

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.


Trevis

May 27, 2014 at 11:03 am

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?


Tony

  • Support Staff

May 27, 2014 at 11:15 am

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?


Trevis

May 27, 2014 at 11:23 am

That did the trick—thank you!

Viewing 10 reply threads

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.

Event Espresso