Title: Get subscriber data
Last modified: November 24, 2022

---

# Get subscriber data

 *  Resolved [dafsade](https://wordpress.org/support/users/dafsade/)
 * (@dafsade)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/get-subscriber-data/)
 * Hi
    I use MC4WP with a CF7 form. The form has a second acceptance (checkbox) 
   field. If the user checks this checkbox I need to also add a specific tag to 
   the subscriber.
 * Below a code to explain what I need:
 *     ```
       add_filter( 'mc4wp_integration_contact-form-7_subscriber_data', function(MC4WP_MailChimp_Subscriber $subscriber, $cf7_form_id) {
           if ($cf7_form_id == 1274) {
               $subscriber->tags[] = 'apple';
               if (subscriber checked that checkbox) { // <== How I get that data?
                  // add another specific tag "banana"
               }
           } else if ($cf7_form_id == 510) {
               // etc
           }
           return $subscriber;
       }, 10, 2);
       ```
   
 * Thanks
    -  This topic was modified 3 years, 6 months ago by [dafsade](https://wordpress.org/support/users/dafsade/).

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

 *  Plugin Contributor [Harish Chouhan](https://wordpress.org/support/users/hchouhan/)
 * (@hchouhan)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/get-subscriber-data/#post-16230879)
 * Hey [@dafsade](https://wordpress.org/support/users/dafsade/),
 * Thanks for reaching out to us.
 * I regret to say this is beyond the scope of our support. You might need to contact
   CF7 support to get the details of how to query the form and get data based for
   the checkbox.
 *  Thread Starter [dafsade](https://wordpress.org/support/users/dafsade/)
 * (@dafsade)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/get-subscriber-data/#post-16231228)
 * Hi,
    the filter mc4wp_integration_contact-form-7_subscriber_data isn’t a mc4wp
   filter? I thought it was in the scope of your plugin.
 * Also the object MC4WP_MailChimp_Subscriber $subscriber seems yours.
 * Just to understand how it works, thanks
 *  Plugin Contributor [Lap](https://wordpress.org/support/users/lapzor/)
 * (@lapzor)
 * [3 years, 6 months ago](https://wordpress.org/support/topic/get-subscriber-data/#post-16231685)
 * Hi,
 * The example code that you referred to is for setting a tag per CF7 ID.
 * You can adept that code to set a tag for different conditions, besides the CF7
   form ID. You can reach the CF7 post data via $_POST.
 * You may need a PHP programmer to write the needed custom code for you / to adept
   the code sample you referred to to make it do what you want.
 * Kind regards,

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

The topic ‘Get subscriber data’ is closed to new replies.

 * ![](https://ps.w.org/mailchimp-for-wp/assets/icon-256x256.png?rev=1224577)
 * [MC4WP: Mailchimp for WordPress](https://wordpress.org/plugins/mailchimp-for-wp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/mailchimp-for-wp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/mailchimp-for-wp/)
 * [Active Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/mailchimp-for-wp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/mailchimp-for-wp/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Lap](https://wordpress.org/support/users/lapzor/)
 * Last activity: [3 years, 6 months ago](https://wordpress.org/support/topic/get-subscriber-data/#post-16231685)
 * Status: resolved