Radbert on "[Plugin: MailChimp for WordPress] How to set default Groupings/Interests value in CF7 and send to MailChimp?"

ساخت وبلاگ

Mariniertje
Member
Posted 21 hours ago #

Hi Danny,

I have installed your plugin earlier today, and with just some basic fields it works like a charm!

However, my MailChimp list has a Group with 3 possible values. And I would like to set a default value for this grouping for each user that subscribes using the CF7 form. This field basically determines if they would receive a newsletter daily/weekly/monthly.

What (short)code do I use to add that Groupings/Interests field to the CF7 form and make sure it is sent to MailChimp?

Thanks for your help

https://wordpress.org/plugins/mailchimp-for-wp/

Lap
Member
Plugin Contributor

Posted 15 hours ago #

Hi,

That is possible with some custom code, if you have experience

The filter for this would be: mc4wp_integration_contact-form-7_subscriber_data

Apart from that you can follow the example we made for woocommerce integration: https://github.com/ibericode/mc4wp-snippets/blob/master/integrations/woocommerce/add-to-grouping.php

If you have the Premium version of our product we can write the code for you and include it in your WordPress.

Hope that helps.

Radbert
Member
Posted 14 minutes ago #

Hi Lap:

I'm trying to do the exact same thing - use the CF7 form to assign the user to a hidden interest grouping.

I'm fairly decent with code, just not sure where I should put that snippet from github. Would that go in my functions.php? Or directly into the CF7 form builder?

Also, looking at the snippet, I have one question:
Do I need to define every grouping as true or untrue? Or if I just define the desired grouping as true, does that suffice?

Thanks in advance for your help.

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 475 تاريخ : جمعه 5 شهريور 1395 ساعت: 5:30