Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global $current_user;
- get_currentuserinfo();
- if (class_exists('wpMail')) {
- $wpMail = new wpMail();
- global $Subscriber;
- $data = array(
- 'email' => $current_user -> user_email,
- 'list_id' => array(2),
- 'mailinglists' => array(2),
- 'firstname' => "Andrew",
- 'lastname' => "Traub",
- );
- if ($Subscriber -> email_validate($current_user -> user_email) && $Subscriber -> optin($data, false)) {
- //success
- } else {
- print_r($Subscriber -> errors);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement