Community Support Forums — WordPress® ( Users Helping Users ) — 2011-07-08T15:31:10-05:00 http://www.primothemes.com/forums/feed.php?f=4&t=10388 2011-07-08T15:31:10-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22677#p22677 <![CDATA[Re: edition in "member profile" not updating mailchimp]]> ~ MUCH appreciated!

Statistics: Posted by Jason Caldwell — July 8th, 2011, 3:31 pm


]]>
2011-07-06T15:56:53-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22495#p22495 <![CDATA[Re: edition in "member profile" not updating mailchimp]]> Just paste that code in mu-plugins/s2-hacks.php :)

Code:
add_action( 'ws_plugin__s2member_during_handle_profile_modifications','function_ws_plugin__s2member_during_handle_profile_modifications', 10, 1);

function function_ws_plugin__s2member_during_handle_profile_modifications($a)
{
    include_once $_SERVER['DOCUMENT_ROOT']."/feature/wp-content/plugins/s2member/includes/_xtnls/mailchimp/nc-mcapi.inc.php";
    $mcapi = new NC_MCAPI ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["mailchimp_api_key"], true); 

    $mailchimp 
= array ("function" => __FUNCTION__, "func_get_args" => $a["_p"], "api_method" => "listUpdateMember");
    $mailchimp["list_id"] = "08e278e7b0";
    $email = $a["current_user"]->data->user_email;;

    $my_custom_elements = array(
        'MERGE0' => $a["_p"]["ws_plugin__s2member_profile_email"],
        'MERGE1' => $a["_p"]["ws_plugin__s2member_profile_first_name"],
        'MERGE2' => $a["_p"]["ws_plugin__s2member_profile_last_name"],
        'MERGE3' => $a["_p"]["ws_plugin__s2member_profile_merge3"],     //Job title
        'MERGE4' => $a["_p"]["ws_plugin__s2member_profile_merge4"],        //Organization Name
        'MERGE5' => $a["_p"]["ws_plugin__s2member_profile_merge5"],        //address1
        'MERGE6' => $a["_p"]["ws_plugin__s2member_profile_merge6"],        //address2
        'MERGE7' => $a["_p"]["ws_plugin__s2member_profile_merge7"],        //city
        'MERGE8' => $a["_p"]["ws_plugin__s2member_profile_merge8"],        //state
        'MERGE9' => $a["_p"]["ws_plugin__s2member_profile_merge9"],        //zip
        'MERGE10' => $a["_p"]["ws_plugin__s2member_profile_merge10"],        //phone
        'MERGE13' => $a["_p"]["ws_plugin__s2member_profile_merge13"]        //country
    );

    $mailchimp["merge_array"] = $my_custom_elements;


    $mailchimp["api_response"] = $mcapi->{$mailchimp["api_method"]}($mailchimp["list_id"], $email, $mailchimp["merge_array"], "html", false); 

     $mailchimp
["api_success"] = $success = true; 
    $mailchimp
["api_properties"] = $mcapi; 

//    echo "<pre>";    print_r($mailchimp);echo "</pre>";
    
} 


Note that is still missing a lot of features and some parts are hard coded because I only need it for this site, something more general needs to use other global variables or better coding standards :P

Statistics: Posted by Leinad — July 6th, 2011, 3:56 pm


]]>
2011-07-05T19:04:26-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22438#p22438 <![CDATA[Re: edition in "member profile" not updating mailchimp]]> Gotchya. Thanks for the follow-up.

Yes, I would suggest this Hook for you.
ws_plugin__s2member_during_handle_profile_modifications

See: viewtopic.php?f=40&t=9605&src_doc_v=110605#src_doc_line_121

Statistics: Posted by Jason Caldwell — July 5th, 2011, 7:04 pm


]]>
2011-07-05T11:29:46-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22399#p22399 <![CDATA[Re: edition in "member profile" not updating mailchimp]]>
can you point me in the right direction as to what files you think they might be modified?

thank you very much :)

Statistics: Posted by Leinad — July 5th, 2011, 11:29 am


]]>
2011-07-04T17:52:06-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22339#p22339 <![CDATA[Re: edition in "member profile" not updating mailchimp]]>
well, if my client wants it I'll post the code when is done, otherwise we'll wait for Jason's update :D

Statistics: Posted by Leinad — July 4th, 2011, 5:52 pm


]]>
2011-07-04T12:41:24-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22293#p22293 <![CDATA[Re: edition in "member profile" not updating mailchimp]]> I'll see what I can do about this in a future release.

Statistics: Posted by Jason Caldwell — July 4th, 2011, 12:41 pm


]]>
2011-07-04T12:34:47-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22289#p22289 <![CDATA[Re: edition in "member profile" not updating mailchimp]]> Statistics: Posted by cassel — July 4th, 2011, 12:34 pm


]]>
2011-07-04T12:28:19-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22287#p22287 <![CDATA[Re: edition in "member profile" not updating mailchimp]]> Statistics: Posted by Cristián Lávaque — July 4th, 2011, 12:28 pm


]]>
2011-07-04T12:02:45-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22273#p22273 <![CDATA[Re: edition in "member profile" not updating mailchimp]]> Statistics: Posted by cassel — July 4th, 2011, 12:02 pm


]]>
2011-07-04T11:57:38-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22270#p22270 <![CDATA[Re: edition in "member profile" not updating mailchimp]]>

Statistics: Posted by Cristián Lávaque — July 4th, 2011, 11:57 am


]]>
2011-07-04T11:35:50-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22265#p22265 <![CDATA[Re: edition in "member profile" not updating mailchimp]]> Statistics: Posted by cassel — July 4th, 2011, 11:35 am


]]>
2011-07-04T11:24:34-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22261#p22261 <![CDATA[Re: edition in "member profile" not updating mailchimp]]> WP Admin -> s2Member -> API / List Server -> Automate Un-Subscribe/Opt-Outs :)

Statistics: Posted by Cristián Lávaque — July 4th, 2011, 11:24 am


]]>
2011-07-04T10:23:52-05:00 http://www.primothemes.com/forums/viewtopic.php?t=10388&p=22250#p22250 <![CDATA[edition in "member profile" not updating mailchimp]]>
is this "by design"?
if so, what can I do to manually code it?

Statistics: Posted by Leinad — July 4th, 2011, 10:23 am


]]>