Skip to content

Instantly share code, notes, and snippets.

@gspice
Forked from amdrew/1.php
Created April 4, 2019 20:33
Show Gist options
  • Save gspice/4eb49d3043ad2ba1a5c67cda6a48614a to your computer and use it in GitHub Desktop.
Save gspice/4eb49d3043ad2ba1a5c67cda6a48614a 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' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment