Skip to content

Instantly share code, notes, and snippets.

@amdrew
Created June 1, 2014 02:24
Show Gist options
  • 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 protected]';
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 protected]', '[email protected]' );
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 protected]', '[email protected]' );
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