Support

Home Forums Event Espresso Premium My events showing past sold out events

My events showing past sold out events

Posted: April 30, 2019 at 3:38 am

Viewing 4 reply threads


SupercarDriver

April 30, 2019 at 3:38 am

Hi Guys, here is the original topic:
https://eventespresso.com/topic/my-events-not-showing-all-events-for-various-people/

Thought it had been solved but seems as though sold out events still appear after the event has passed, so it’s confusing some people.

I have a members account that I can use to test and can see upcoming events (correct), and all past events are hidden apart from sold-out events which are still showing.


SupercarDriver

April 30, 2019 at 3:42 am

.


Tony

  • Support Staff

April 30, 2019 at 5:25 am

Ah, yeah, the event status may stay as sold out even for expired events.

After the code I gave you for content-espresso_my_events-event_section.template.php

Add if ( $event->is_expired() ) { return; }

The function you are already using will only allow Upcoming and Sold out events through, the above then check to confirm they haven’t expired.

You could just check sold out events specifically using:

if ( $event->>get_active_status() == EE_Datetime::sold_out 
&& $event->is_expired() ) { 
    return; 
}

Either one should fix it.


SupercarDriver

April 30, 2019 at 5:31 am

Thanks, added if ( $event->is_expired() ) { return; } and it’s done the trick, members will now only see upcoming events.
Thanks again ๐Ÿ™‚


Tony

  • Support Staff

April 30, 2019 at 6:44 am

You’re most welcome ๐Ÿ™‚

Viewing 4 reply threads

The support post ‘My events showing past sold out events’ 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