• In the sendinblue integration, sometimes existing newsletter subscribers re-subscribe (because they are not sure if they are on the list, or because they have subscribed to a different list before). In this case, CF7 currently rejects the contact with a message saying

    PHP Notice: HTTP Response: 400 Bad Request {“code”:”duplicate_parameter”,”message”:”Contact already exist”}

    I realized, this behavior can be changed easily via this filter:

    add_filter(‘wpcf7_sendinblue_contact_parameters’, function($params) {
    $params[‘updateEnabled’] = true;
    return $params;
    });

    Can you add it to the sendinblue documentation, please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thanks for this info! It fixed my issue of adding existing contacts to a list (where contact was already in available or not -> both are working).

    Hi @benjamin4 & @gamevampy, good to hear that you have found the solution to a problem that I also have. Since my in-depth knowledge of WordPress is limited, it would be great if you could clarify where/in which file I would have to insert the filter hook. Thanks, Nuku

    • This reply was modified 2 years, 1 month ago by nukumichi.
    • This reply was modified 2 years, 1 month ago by nukumichi.
    gamevampy

    (@gamevampy)

    @nukumichi You have to add a custom PHP-code file that inserts the code from the main post in the whole website.
    I used the WPCode plugin to create mine, but it can be any PHP code insertion plugin.
    Flow with WPCode:

    • Go to Code Snippets in WordPress
    • Click “Add New” button
    • Select “Add your custom code (new snippet)”
    • On the top right “Code type”, select PHP snippet
    • Copy-paste the code from the main post in the “code preview” textarea
    • Make sure “auto insert” is marked, and at location, i’ve selected “Run anywhere”
    • Save it and active it, and you’re ready to go (if you have caching active, clear cache aswell)
    nukumichi

    (@nukumichi)

    Hi @gamevampy, thanks for pointing the flow out to me. I tried to implement it, but ran into the following problems:

    – I was able to create the PHP snippet from the main post in WPCode, but it is not possible to activate it. Whenever I toggle it on, it shows as deactivated again once I refresh the page. Predefined snippets seem to activate without problems though.

    – I then installed the plugin “Woody Snippets”, that can be used for the same purpose. Here, activating the snipped worked fine.

    However, when testing afterwards, I noticed that my initial problem still exists: I’ve got a SIB automation set up that starts to run once a contact is added to a list via a CF7 form. This works just fine for fresh contacts unknown to SIB, but fails if the contact ist already in the SIB database. In that case, the automation never executes, regardless of whether the contact is already on the list or not.

    Do you have an idea why this doesn’t work? Is there a way to check if the filter hook is really activated and works as intended? I already contacted SIB support, but they claim not to be responsible for the issue.

    Best
    Nuku

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Sendinblue – Update contact if exists’ is closed to new replies.