• Resolved sandeepail

    (@sandeepail)


    I am trying to setup a page where users can subscribe to unlock some content on my site. I have been trying out the lite version of this plugin and would like to know a bit more before i upgrade to pro.

    1) I would like users to enter a valid email id to have access to download content.

    2) In order to ensure validity, I will have to select the double opt-in option

    3) When the user opts in via email, I can redirect him to a download page via mailchimp

    There is one problem I face with the above method:

    My mailchimp list has groups and subgroups. So it is quite possible that, a user subscribing on this particular page to unlock content is already subscribed to the same list in some other group. In this case, mailchimp will not send him an opt-in mail and hence he will not be redirected to the download page.

    Now, to solve this problem, I’d like to know if it is possible for the plugin to redirect users who are already subscribed (Note: Auto update list settings will be on, so that the subscriber will get added to the new group as well without removing him from his existing group)

    I know, this might not be possible with the current version of the plugin.. but is there a way to tweak the existing redirection method of the plugin to achieve this?

    http://planningproapp.com/12-project-management-templates-project-manager/

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

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi there,

    The plugin comes with an API you can use so any developer should be able to get this to work in a relative short amount of time.

    Here is a rough draft of what I’m thinking of.

    1) Have the user subscribe through a plugin form, this will set a cookie with their email.

    2) Redirect them to your private content page (or link to this page from your confirmation email).

    3) On that page, use something like the following piece of code to check if they’re subscribed (and confirmed)

    $api = mc4wp_get_api();
    $list_id = 'ABCDEFGHIJKL';
    
    if ( $api->list_has_subscriber( $list_id, 'johndoe@gmail.com' ) == false ) {
    	// user is not subscribed, redirect to a sign-up page or something like that.
    	wp_redirect( 'http://yoururl.com/sign-up/' );
    	exit;
    }

    Another option that doesn’t require any custom code at all is to set a WordPress password on the page and show that password in the confirmation email, although this still leaves out already subscribed users..

    Hope that helps a bit! Good luck.

    Thread Starter sandeepail

    (@sandeepail)

    Hi Danny

    Thanks for responding so quickly. I was hoping i could put this code somewhere in your plugin. For instance, on form submit your plugin checks for status and gives a message if already subscribed. Does it check for this status, even if auto-update list setting is on?

    If yes, can a redirection be set at this point? All other users can get a opt-in email and get redirected from there.

    If this is possible, and you can help me with the appropriate tweaks then I can upgrade to pro and submit a support request there.

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

The topic ‘Subscribe to unlock – a tricky problem’ is closed to new replies.