PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

MAILCHIMP AND EOT

s2Member Plugin. A Membership plugin for WordPress®.

MAILCHIMP AND EOT

Postby juanmaria » October 13th, 2011, 9:48 pm

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?
User avatar
juanmaria
Registered User
Registered User
 
Posts: 4
Joined: October 6, 2011

Re: MAILCHIMP AND EOT

Postby Eduan » October 14th, 2011, 8:32 am

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. :)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: MAILCHIMP AND EOT

Postby juanmaria » October 14th, 2011, 10:15 am

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???
User avatar
juanmaria
Registered User
Registered User
 
Posts: 4
Joined: October 6, 2011

Re: MAILCHIMP AND EOT

Postby Eduan » October 14th, 2011, 10:46 am

Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: MAILCHIMP AND EOT

Postby juanmaria » October 14th, 2011, 11:06 am

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.
User avatar
juanmaria
Registered User
Registered User
 
Posts: 4
Joined: October 6, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: Exabot [Bot], Google [Bot] and 1 guest

cron