WordPress.org

Ready to get started?Download WordPress

Forums

MailChimp Widget
Mailchimp Error (4 posts)

  1. rgoins
    Member
    Posted 2 years ago #

    Is there any way to have the widget display a more specific error? For example, if an email address is already taken then have the error say something to the effect of "the email address is already in use". This is the BIGGEST complaint I have because I get numerous reports of people not being able to submit and it would be a HUGE benefit from a troubleshooting perspective to have a more detailed error.

    http://wordpress.org/extend/plugins/mailchimp-widget/

  2. Melfith
    Member
    Posted 2 years ago #

    You can choose to update the subscriber instead of throwing an error. In the mcapi.class.php line 1567 put $update_existing=true instead of false in the listSubscribe function

  3. Melfith
    Member
    Posted 2 years ago #

    You 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;
     }
    }
  4. yslifeapp
    Member
    Posted 2 years ago #

    Ok I am getting an error message...When I go to Settings>Mailchimp Setup...I get an error message: Parse error: syntax error, unexpected T_REQUIRE_ONCE in /home/sarah12/yslifeapp.com/wp-admin/options-general.php on line 12

    I went through the FTP couldn't find the error and went through the MYSQL and even clicked Plugins>Installed Plugins>Edit and still wasn't able to see the error, where do I go and what is the error on Line 12?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic