Support

Home Forums Event Espresso Premium Change redirect to events list URL

Change redirect to events list URL

Posted: July 18, 2024 at 8:11 am

Viewing 2 reply threads


YesEmpower

July 18, 2024 at 8:11 am

Does this filter still work: FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url?

I’ve been using a custom function to change the redirect of the “Return to Events List” button in the Multi Event Registration add-on. It used to redirect users back to the page they came from, but recently that stopped working and it now redirects back to the defult /events/ page. Here is the full code:
function ee_mer_change_event_list_url( $events_list_url ) {
if ( ! is_admin() && isset( $_SERVER[‘HTTP_REFERER’] ) ) {
$events_list_url = $_SERVER[‘HTTP_REFERER’];
}
return $events_list_url;
}
add_filter( ‘FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url’, ‘ee_mer_change_event_list_url’, 10, 1 );


YesEmpower

July 18, 2024 at 8:43 am

Update: I was able to get this working again by removing the ! is_admin() check. That was returning true on the frontend because of the ajax request(s) being made in the modal. Not sure why this wasn’t problem before, but removing that condition solved the problem for me.


Sam

  • Support Staff

July 18, 2024 at 11:35 am

I’m glad you got that working now. Please feel free to ask if you have any other questions.

Viewing 2 reply threads

The support post ‘Change redirect to events list URL’ 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