• Resolved szmigieldesign

    (@szmigieldesign)


    Hello,
    I have a form that manages subscription without any problems. However, after the user has decided to unsubscribe, it’s impossible to subscribe again using the API (via quform) – users don’t receive confirmation emails. Is it related to the plugin or mailchimp?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter szmigieldesign

    (@szmigieldesign)

    I’ve just tested the resubscribe behavior on default (embedded) Mailchimp form and it works. I can unsubscribe and then fill in the form and I receive subscription email without any problems.

    It seems that for some strange reason it doesn’t work with Quform. Once unsubscribed, trying to subscribe again with Quform form is impossible – subscription email is not triggered and the user status doesn’t change from unsubscribed to subscribed.

    Plugin Author ThemeCatcher

    (@themecatcher)

    Hi

    It may help if you can see the response from Mailchimp when Quform adds the subscriber. You can use the Log HTTP Requests plugin to see this.

    I will attempt to replicate this to see if there is anything that can be done within Quform to fix this.

    Regards, Ally

    Plugin Author ThemeCatcher

    (@themecatcher)

    Hi

    Can you try adding the following code to the WordPress theme functions.php file (or create a plugin for it).

    add_filter('quform_mailchimp_integration_data', function ($data, $form, $integration) {
        $data['status'] = $integration->config('doubleOptIn') ? 'pending' : 'subscribed';
    
        return $data;
    }, 10, 3);

    With this change it sends the confirmation email when they resubscribe. I’ll do more testing and get this fix into the next update, it would be good to know if this works for you.

    Regards, Ally

    Thread Starter szmigieldesign

    (@szmigieldesign)

    Yeah, it worked. Thanks!

    Since this code will be included with plugin update – shall I remove the code from functions.php prior to updating?

    Plugin Author ThemeCatcher

    (@themecatcher)

    Hi

    I’ve released version 1.0.4 of this plugin with a fix for this issue. The problem with the code I gave you above is that it will set subscribed users back to pending too, meaning they will need to confirm their subscription again.

    In the new version I made it so that only unsubscribed users will be resubscribed, either immediately or via the confirmation email depending on whether double opt-in is enabled in the integration settings, and currently subscribed contacts will be unaffected. So you’ll no longer need the code I gave you if you use the new version.

    Regards, Ally

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unable to resubscribe’ is closed to new replies.