• Resolved kuberagroup

    (@kuberagroup)


    Hi, I have a two CF7 forms which upload successfully into MC. I also upload wordpress commenters into MC too, typically works correctly.

    The issue is that when the CF7 form is submitted MC4WP also adds the ‘reviewer’ tag to the subscriber (which is not the form submitted)

    Is there a way to not submit the wordpress comment tags when a CF7 form is submitted?
    Issue does not occur when submitting the wordpress comment form as it filters out the CF7 forms.

    Below code is in my functions.php

    add_filter( 'mc4wp_integration_contact-form-7_subscriber_data', function(MC4WP_MailChimp_Subscriber $subscriber, $cf7_form_id) {
       if ($cf7_form_id == 46642) {
           $subscriber->tags[] = 'Newsletter';
       } else if ($cf7_form_id == 46662) { 
           $subscriber->tags[] = 'Stickers';
           $subscriber->tags[] = 'Owner';
       }
       return $subscriber;
    }, 10, 2);
    
    add_filter( 'mc4wp_subscriber_data', function(MC4WP_MailChimp_Subscriber $subscriber) {
       $subscriber->tags[] = 'Reviewer';
       return $subscriber;
    });
    

    Cheers

    • This topic was modified 4 years, 5 months ago by kuberagroup.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Harish Chouhan

    (@hchouhan)

    Hey @kuberagroup,

    Thanks for reaching out to us.

    The 2nd set of code targets all submissions using our plugin. Can you please let me know for which form/integration you want to add the “Reviewer” tag?

    Thread Starter kuberagroup

    (@kuberagroup)

    I operate a site that is review based and uses the default wordpress comment system for each review. For those reviews I store their email and add tag of ‘reviewer’. However when someone scrolls to our footer and subscribes to our CF7 newsletter it gives them the reviewer tag.

    I’m trying to separate the tags so that only the wordpress comment form receives the ‘reviewer’ tag and not the CF7 forms.

    Plugin Contributor Lap

    (@lapzor)

    Please see https://github.com/ibericode/mc4wp-snippets/blob/master/integrations/integration-slugs.md

    Hope that helps. If you have any questions, please let me know!

    Thread Starter kuberagroup

    (@kuberagroup)

    hi @lapzor, I’ve previously looked through the integration slugs but still unable to get it to work correctly. Any assistance with the code would be appreciated. thanks

    Plugin Contributor Lap

    (@lapzor)

    mc4wp_subscriber_data affects ALL integrations.

    mc4wp_integration_wp-comment-form_data will apply the filter only to the comment form.

    Hope that helps. If you have any questions, please let me know!

    Thread Starter kuberagroup

    (@kuberagroup)

    oh i see, thank you for your assistance! much appreciated.

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

The topic ‘WordPress comments and CF7 at the same time’ is closed to new replies.