The code that was in this gist has been deprecated in favor of filters within the Multi Event Registration Add-on
Please use the example shown here: https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-multi-event-registration/eea-mer-custom-cart-results-messages.php