• Resolved elotse

    (@elotse)


    The integration in the WP comments does not work!
    My website is: https://www.kk4you.de
    The form is integrated as described in the document “Add Mailchimp interest choice to WP comment form”
    https://www.mc4wp.com/kb/add-interest-group-choice-comment-form/

    However, the email is not entered in the audience
    The registration via widget works

    The following code was added to the function.php

    // V1.1  Integration MailChimp in Kommentabereich
    add_action( 'comment_form', function() {
      ?>
      <!-- Paste your groupings HTML here, replacing this line -->
      <br>
      <hr>
      <h3>Newsletter abonnieren</h3>
      <p>
    	<label>E-Mail: 
    		<input type="email" name="EMAIL" placeholder="Deine E-Mail Adresse" required />
      </label>
      </p>
        <p>
            <label>Bitte Webseiten ausw&auml;hlen</label><br />
            <label>
                <input name="INTERESTS[2b24c8f06c][]" type="checkbox" value="e19db7caf7"> <span>KK4YOU</span>
            </label><br />
            <label>
                <input name="INTERESTS[2b24c8f06c][]" type="checkbox" value="f0f916c117"> <span>CUISINE4YOU</span>
            </label><br />
            <label>
                <input name="INTERESTS[2b24c8f06c][]" type="checkbox" value="4fec60168d"> <span>MSR-SUPPORT</span>
            </label>
        </p>
        <p>
        	<input type="submit" value="Registrieren" />
        </p>
      <?php
    });
    
    add_filter('mc4wp_integration_data', function($vars) {
      $vars['INTERESTS'] = isset($_POST['INTERESTS']) ? $_POST['INTERESTS'] : array();
      return $vars;
    });

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Lap

    (@lapzor)

    Did you activate the integration under Mailchimp for WP > Integrations > WordPress Comment form?

    Thread Starter elotse

    (@elotse)

    Yes, this is the setting
    Comment Form -Subscribes people from your WordPress comment form. -Aktiv

    • This reply was modified 5 years, 1 month ago by elotse.
    Plugin Contributor Lap

    (@lapzor)

    Under Mailchimp for Wp > Other, please set it to “log everything” and then test the integration again. Does anything show up in the log?

    Thread Starter elotse

    (@elotse)

    This is the Logfile:
    [2021-05-02 12:14:01] WARNING: Comment Form > [email protected] is already subscribed to the selected list(s)
    [2021-05-02 12:23:54] WARNING: Comment Form > [email protected] is already subscribed to the selected list(s)

    The message is confused
    I entered a different email and tried different email addresses, always the same message
    The email entered in the log file is the admin email address

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey @elotse,

    Have you selected multiple lists for the same form? Also, have you enabled “Double Opt-in”?

    Thread Starter elotse

    (@elotse)

    Hey Harish,
    I found the error, it wasn’t the plugin!
    One problem was that the email was still active in the cache, the second was that I had used a selection list with three tags and the code was not integrated correctly.

    Thank you for the help, the log file was a good tip

    Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey @elotse,

    Thanks for the update. I’m glad you were able to resolve the issue.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Integration in WP comment form’ is closed to new replies.