latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: Regis Cassidy

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing topic 1 (of 1 total)
Topic Count Last Reply
Mailchimp Groups and Registration Form

By:  Regis Cassidy in: Community Forum

voices: 1
replies: 1

4 years, 6 months ago  Regis Cassidy

Viewing topic 1 (of 1 total)

Topics I've Started

Viewing topic 1 (of 1 total)
Topic Count Last Reply
Mailchimp Groups and Registration Form

By:  Regis Cassidy in: Community Forum

voices: 1
replies: 1

4 years, 6 months ago  Regis Cassidy

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Thursday Jul 12th, 2012 at 2:26 pm #19059

I came up with a solution and thought I would share.

1. In my Mailchimp account I create the group name ‘Location’ under my single list
2. In S2Member->General Options->Registration/Profile Fields & Options I created a new field with the unique id ‘location’ and configured this as a drop down menu with the appropriate fields.
3. In S2Member->API/List Servers->MailChimp Integration I entered my single Mailchimp list ID number under free users
4. I SSHed to my webhost and created the file wp-content/mu-plugins/s2-hacks.php and entered the following code:

<?php
    add_filter("ws_plugin__s2member_mailchimp_merge_array", "my_filter", 10, 2);
    function my_filter($merge, $vars)
        {
            $user_id = $vars["user_id"];
            $user_custom = get_user_option("wp_s2member_custom_fields", $user_id);
            $mc_group_val = $user_custom['location'];   //use your unique field id from step 2 here
            $interest_group = array ("GROUPINGS" => array (array ("name" => 'Location', "groups" => $mc_group_val)));   //where name is the Group name created in MailChimp (e.g. Location)

            return array_merge($merge, $interest_group);
        }
?>

I hope this may help others as it took me quite some time to figure this out.

Good luck,
Regis

Viewing 1 replies (of 1 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.