php - Mailchimp double_optin option not working -
i've followed this tutorial implement mailchimp api v2.0 on website. works great, double_optin option wanted add , set false (so users don't need validate registration via e-mail) doesn't seem working. it's if not taken consideration @ all, users still need validate registration via e-mail.
is 'double_optin' => false
placed @ wrong place? had @ mailchimp documentation level in programmation not enough identify wrong. help
<?php $api_key = "12345486-us8"; $list_id = "123"; require('mailchimp.php'); $mailchimp = new mailchimp( $api_key ); $mailchimp_lists = new mailchimp_lists( $mailchimp ); $subscriber = $mailchimp_lists->subscribe( $list_id, array( 'email' => htmlentities($_post['email']),'double_optin' => false ) ); if ( ! empty( $subscriber['leid'] ) ) { echo "success"; } else { echo "fail"; } ?>
according (admittedly unofficial-looking) mailchip_lists documentation, you'll want pass false
5th parameter subscribe().
example:
$double_optin = false; $subscriber = $mailchimp_lists->subscribe( $list_id, array('email' => htmlentities($_post['email'])), null, // merge_vars 'html', // email_type $double_optin );
Comments
Post a Comment