Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active February 3, 2020 21:39
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Pebblo/844777c4c5be9f647b752f8a9bda50d0 to your computer and use it in GitHub Desktop.
Save Pebblo/844777c4c5be9f647b752f8a9bda50d0 to your computer and use it in GitHub Desktop.
Example of how to change the 'Return to event list' used by the MER plugin to link to the page the user users to add the event to the cart,
<?php //Please do include the opening PHP tag if you already have one.
function tw_ee_mer_change_event_list_url_to_referer( $return_url ){
if( !empty( $_SERVER[ 'HTTP_REFERER' ] ) ) {
$return_url = $_SERVER[ 'HTTP_REFERER' ];
}
return $return_url;
}
add_filter( 'FHEE__EED_Multi_Event_Registration__set_definitions__events_list_url', 'tw_ee_mer_change_event_list_url_to_referer' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment