Statistics: Posted by Jason Caldwell — July 8th, 2011, 3:31 pm
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>";
}
Statistics: Posted by Leinad — July 6th, 2011, 3:56 pm
Statistics: Posted by Jason Caldwell — July 5th, 2011, 7:04 pm
Statistics: Posted by Leinad — July 5th, 2011, 11:29 am
Statistics: Posted by Leinad — July 4th, 2011, 5:52 pm
Statistics: Posted by Jason Caldwell — July 4th, 2011, 12:41 pm
Statistics: Posted by Cristián Lávaque — July 4th, 2011, 11:57 am
Statistics: Posted by Cristián Lávaque — July 4th, 2011, 11:24 am
Statistics: Posted by Leinad — July 4th, 2011, 10:23 am