Zoker

Untitled

Dec 8th, 2021
863
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.  
  3. function mailchimp_signup( $fields ) {
  4.     $newsletter = $fields['custom_fields']['newsletter'];
  5.     $name = $fields['firstname'];
  6.     $email = $fields['email'];
  7.     if($newsletter) {
  8.        MailChimp->AddEmail($email, $name);
  9.     }
  10. }
  11. add_action( 'booknetic_booking_done', 'mailchimp_signup', 30, 2 );
RAW Paste Data