Support

Home Forums Event Espresso Premium Change Ticket Selector Shortcode Output (For expired events)

Change Ticket Selector Shortcode Output (For expired events)

Posted: June 14, 2018 at 11:20 am

Viewing 2 reply threads


KZNTR

June 14, 2018 at 11:20 am

Hi guys!

We are looking for a way to change the “View Details” button that appears on a ticket selector when the associated event has expired.

All we want it to say is “Online Entries Closed”

Thanks a lot


KZNTR

June 14, 2018 at 11:22 am

Oh I forgot to mention we do not need it to link to any page. Simply display an “Entries Closed” notification. We don’t want users to get redirected to the EE event page.


Josh

  • Support Staff

June 14, 2018 at 2:01 pm

You can use the available filter hooks to change those. e.g.

add_filter(
    'FHEE__EE_Ticket_Selector__display_view_details_btn__btn_text',
    'my_custom_view_details_text_expired_events',
    10,
    2
);
function my_custom_view_details_text_expired_events($text, $event) {
    if($event instanceof EE_Event){
        if($event->get_active_status()=='DTE') {
            $text = 'Online Entries Closed'; 
        }
    }
    return $text;
}

add_filter(
    'FHEE__EE_Ticket_Selector__display_view_details_btn__btn_url',
    'my_custom_view_details_url_expired_events',
    10,
    2
);
function my_custom_view_details_url_expired_events($url, $event) {
    if($event instanceof EE_Event){
        if($event->get_active_status()=='DTE') {
            $url = ''; 
        }
    }
    return $url;
}

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.

Viewing 2 reply threads

The support post ‘Change Ticket Selector Shortcode Output (For expired 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