Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
506
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.45 KB | None | 0 0
  1. <?php
  2.  
  3. if (class_exists('wpMailinglist')) {
  4.     if ($wpMailinglist = new wpMailinglist()) {
  5.         global $Subscriber;
  6.        
  7.         $subscriber = array(
  8.             'email'             =>  "email@domain.com",     //the email of the subscriber
  9.             'list_type'         =>  "specific",             //always leave this "specific"
  10.             'list_id'           =>  "1",                    //the ID of the mailing list to subscribe to
  11.         );
  12.        
  13.         if ($Subscriber -> optin($subscriber, true)) {
  14.             //subscriber was saved!
  15.         }
  16.     }
  17. }
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement