Skip to content

Instantly share code, notes, and snippets.

@Pebblo
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pebblo/14c735131cf6c969c24f to your computer and use it in GitHub Desktop.
Save Pebblo/14c735131cf6c969c24f to your computer and use it in GitHub Desktop.
A fix for a conflict between WP-EMail and Event Espresso. Once the attendee entered their personal information on the registration page, WP-Email would re-direct the user to a share post form, this removes the action for registration pages. Add this to a site specific plugin or your themes functions.php file.
<?php //Please do not include the opening php tag if one is already open.
function ee_wp_mail_fix()
{
global $this_is_a_reg_page;
if($this_is_a_reg_page) {
remove_action('template_redirect', 'wp_email', 5);
}
}
add_action( 'template_redirect', 'ee_wp_mail_fix', 4 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment