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
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
(@aaronrobeson)
9 years, 10 months ago
I am successfully using this plugin to get users names, emails, and selection of interest groups through a form. I would like to get that same information from the comment form on blog posts (the comment form has the same fields) is there any way to do that? Currently the only information I get is the email, I need their selected interest groups, and name.
https://wordpress.org/plugins/yikes-inc-easy-mailchimp-extender/