Page 1 of 1

MAILCHIMP AND EOT

PostPosted: October 13th, 2011, 9:48 pm
by juanmaria
Hello,

I want to add a EOT field to my Mailchimp list.

I' ve tried the following code but it doesn't work:

Code: Select all
<?php
add_filter("ws_plugin__s2member_mailchimp_merge_array", "my_filter");
function my_filter($mergeVars)
    {
        $user_id = $vars["user_id"];
        $user_custom = get_user_option("s2member_auto_eot_time", $user_id);
        $my_custom_merge_vars = array("MERGE3" => $user_custom);
        return array_merge($mergeVars, $my_custom_merge_vars);
    }
?>


Maybe it's a problem with the date format?

I use the same code to add the users IP adress and that works fine

Code: Select all
<?php
add_filter("ws_plugin__s2member_mailchimp_merge_array", "my_filter");
function my_filter($mergeVars)
    {
        $user_id = $vars["user_id"];
        $user_custom = get_user_option("s2member_registration_ip", $user_id);
        $my_custom_merge_vars = array("MERGE4" => $user_custom);
        return array_merge($mergeVars, $my_custom_merge_vars);
    }


Can somebody help me please?

Re: MAILCHIMP AND EOT

PostPosted: October 14th, 2011, 8:32 am
by Eduan
This post may help you:
viewtopic.php?f=4&t=15240&p=39160&hilit=eot+mailchimp#p39160

Tell me if it does and I hope it helps you. :)

Re: MAILCHIMP AND EOT

PostPosted: October 14th, 2011, 10:15 am
by juanmaria
I've read that post.
The problem is that the code doesn't work with a date field.
I don't know how to fix that.

Suggestions please???

Re: MAILCHIMP AND EOT

PostPosted: October 14th, 2011, 10:46 am
by Eduan

Re: MAILCHIMP AND EOT

PostPosted: October 14th, 2011, 11:06 am
by juanmaria
Hi thanks for helping

I use the code get_user_option("s2member_auto_eot_time", $user_id); to get the EOT
but I can't add it to a date field in Mailchimp.