Created
February 4, 2015 09:53
-
-
Save bappi-d-great/5b15dedaac081840c62b to your computer and use it in GitHub Desktop.
User Registration to Subscription (wpmu)
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
<?php | |
/* | |
Plugin Name: User Registration to Subscription (wpmu) | |
Plugin URI: http://bappi-d-great.com | |
Description: This plugin allows your users to auto subscribe when registered | |
Author: WPMU DEV | |
Version: 1.0.1 | |
Author URI: http://bappi-d-great.com | |
*/ | |
if( class_exists( 'Incsub_Subscribe_By_Email' ) ){ | |
add_action( 'user_register', 'user_register_cb', 10, 1 ); | |
function user_register_cb( $user_id ) { | |
$user_info = get_userdata( $user_id ); | |
Incsub_Subscribe_By_Email::subscribe_user( $user_info->user_email, 'Manual Subscription', 'User Registration', false, array() ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment