WP Form Fill is not linking to mailchimp audience
-
I was having issues with Contact Form 7 so I have started using WPForms for ONE contact form on the website.
For CF7 forms I was using the below code to turn form fills into Mailchimp subscribers with relevant tags – this is inserted into the Functions.PHP folder in our site.
add_filter( 'mc4wp_integration_contact-form-7_subscriber_data', function(MC4WP_MailChimp_Subscriber $subscriber, $cf7_form_id) { if ($cf7_form_id == 64472) { $subscriber->tags[] = 'General'; } else if ($cf7_form_id == 64487) { $subscriber->tags[] = 'Newsletter'; } else if ($cf7_form_id == 64494) { $subscriber->tags[] = 'SEO AUDIT'; } else if ($cf7_form_id == 64496) { $subscriber->tags[] = 'content calender'; } else if ($cf7_form_id == 64497) { $subscriber->tags[] = 'Future of digital marketing - Whitepaper'; } else if ($cf7_form_id == 64498) { $subscriber->tags[] = 'Marketplaces - whitepaper'; } else if ($cf7_form_id == 64499) { $subscriber->tags[] = 'Website Redesign - Whitepaper'; } else if ($cf7_form_id == 64500) { $subscriber->tags[] = 'CEO Social Media - whitepaper'; } return $subscriber; }, 10, 2);
So I attempted to change this so that the WPForm fills also gets added to Mailchimp with the relevant subscriber tag “newsletter” –
add_filter( 'mc4wp_integration_contact-form-7_subscriber_data', function(MC4WP_MailChimp_Subscriber $subscriber, $wpforms_id) { if ($wpforms_id == 58634) { $subscriber->tags[] = 'Newsletter'; } return $subscriber; }, 10, 2);
However, these form fills are not going into the Mailchimp audience and are not being tagged.
Is there something wrong with the code? Is there a version of this code for WPForms? Or another way to link them to Mailchimp?
*I don’t want to pay for Mailchimp Addon as this is for ONE contact Form on the site*
- The topic ‘WP Form Fill is not linking to mailchimp audience’ is closed to new replies.