Skip to content

Instantly share code, notes, and snippets.

@amdrew
Created June 1, 2014 02:24
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 amdrew/3c7c5d81d975dee9bf4d to your computer and use it in GitHub Desktop.
Save amdrew/3c7c5d81d975dee9bf4d to your computer and use it in GitHub Desktop.
AffiliateWP - Send the affiliate registration admin email to different email address, or multiple email addresses.
<?php
/**
* Send admin notification to a different email address
*/
function affwp_custom_registration_admin_email( $email ) {
// add the email here
$email = 'email@yourdomain.com';
return $email;
}
add_filter( 'affwp_registration_admin_email', 'affwp_custom_registration_admin_email' );
<?php
/**
* Send admin notification to multiple email addresses
*/
function affwp_custom_registration_admin_email( $email ) {
// add the emails to the array here
$email = array( 'email@yourdomain.com', 'someone@anotherdomain.com' );
return $email;
}
add_filter( 'affwp_registration_admin_email', 'affwp_custom_registration_admin_email' );
<?php
/**
* Send admin notification to the admin, as well as other email addresses
*/
function affwp_custom_registration_admin_email( $email ) {
// add the emails to the array here
$email = array( get_option( 'admin_email' ), 'email@yourdomain.com', 'someone@anotherdomain.com' );
return $email;
}
add_filter( 'affwp_registration_admin_email', 'affwp_custom_registration_admin_email' );
@DogmaUnleashed
Copy link

Whenever I implement this code, my entire website goes white and I have to go through the Cpanel to return the functions file to its previous state. Are there are reasons why this might need to be updated?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment