Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Evan Herman

    (@eherman24)

    Hi AaronRobeson,

    Take a look at our comment form integration class on how we handle the data entered by a given user:

    Comment Form Integration Class

    You’ll notice that when the comment form is submitted the data is collected using the WordPress function $comment_data = get_comment( $comment_id );.

    We use the comment data to build the merge variaible array being submitted to MailChimp. The merge data array is then passed to a function subscribe_user_integration which handles the request to MailChimp.

    From what I can see, it doesn’t look like there are any hooks or filters inside of the comment integration class where you can return the entered data. The first available hook or filter to you, is inside of the subscribe_user_integration.

    https://github.com/yikesinc/yikes-inc-easy-mailchimp-extender/blob/55c4da97c02fc91a53f8f885a1691996825d63bd/public/classes/checkbox-integrations.php#L174-L186

    You can use this filter yikes-mailchimp-checkbox-integration-merge-variables, to retrieve/alter any of the data sent over to MailChimp. Inside of body['merge_vars'], is where you’ll find the users email address.

    We’ll have to build in a new action hook, which would allow our users to grab user entered data once a comment form is submitted.

    Evan

    Thread Starter AaronRobeson

    (@aaronrobeson)

    Thanks for getting back so quick, I appreciate the help. I’ll have to keep thinking on this one.

    Plugin Contributor Tracy Levesque

    (@liljimmi)

    ?????? YIKES, Inc. Co-Owner

    Ok, let us know if you need more help.

    Thank you!
    -Tracy

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Getting info from comment form?’ is closed to new replies.