Last active
July 4, 2016 19:28
-
-
Save amdrew/8d76fe47178e9c46355e to your computer and use it in GitHub Desktop.
AffiliateWP - Auto enable affiliate referral notifications
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Auto enable affiliate referral notifications | |
* Pre-selects the "Enable New Referral Notifications" checkbox on the "Settings" tab of the affiliate area when an affiliate either registers from the front-end, or is added from the admin | |
*/ | |
function affwp_custom_auto_enable_affiliate_referral_notifications( $add ) { | |
update_user_meta( affwp_get_affiliate_user_id( $add ), 'affwp_referral_notifications', true ); | |
} | |
add_action( 'affwp_insert_affiliate', 'affwp_custom_auto_enable_affiliate_referral_notifications' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment