Melfith
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [MailChimp Widget] [Plugin: MailChimp Widget] Mailchimp ErrorYou could add the lines below in the ns_widget_mailchimp.class.php :
Just before the line 156
$subscribed = $mcapi->listSubscribe($this->get_current_mailing_list_id($_GET['ns_mc_number']), $_GET[$this->id_base . '_email'], $merge_vars);Put :
$listMemberInfo = $mcapi->listMemberInfo($this->get_current_mailing_list_id($_GET['ns_mc_number']), array($_GET[$this->id_base . '_email'])); if ($mcapi->errorCode){ $response = json_encode($result); exit($response); } else{ if ($listMemberInfo['success']){ $result['error'] = 'The email address is already in use'; $response = json_encode($result); exit($response); } }And just before the line 207
$subscribed = $mcapi->listSubscribe($this->get_current_mailing_list_id($_POST['ns_mc_number']), $_POST[$this->id_base . '_email'], $merge_vars);Put :
$listMemberInfo = $mcapi->listMemberInfo($this->get_current_mailing_list_id($_POST['ns_mc_number']), array($_POST[$this->id_base . '_email'])); if ($mcapi->errorCode) return false; else{ if ($listMemberInfo['success']){ $this->subscribe_errors = 'The email address is already in use'; return false; } }Forum: Plugins
In reply to: [MailChimp Widget] [Plugin: MailChimp Widget] Mailchimp ErrorYou can choose to update the subscriber instead of throwing an error. In the mcapi.class.php line 1567 put
$update_existing=trueinstead of false in the listSubscribe function
Viewing 2 replies - 1 through 2 (of 2 total)