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™
Yea, the Notifications API and/or the Filter method that I posted here is what I'd use for now. I would go ahead and implement one or both of these, so that you can use segmentation based on whatever extra data you need ( i.e. Custom Capabilities, or something else perhaps ).cassel wrote:I am pretty sure he looked into it as he said it was possible, but at this time, if the status of a member changes in WP/s2M say, from level0 to level1, or from Level1 with ccapsA to Level1 with ccapsB, is not taken into account by s2Member, how could it be managed in MC? Maybe i should wait until that is integrated in s2M?
<?php
add_filter("ws_plugin__s2member_mailchimp_merge_array", "my_filter", 10, 2);
function my_filter($merge, $vars)
{
// $merge /* Array of existing MERGE fields that s2Member passes by default. */
// $vars /* Array of defined variables in the scope/context of this Filter. */
$user_id = $vars["user_id"];
// print_r($vars); // Lots of good stuff in this array.
$user_level = get_user_field("s2member_access_level", $user_id);
$user_role = get_user_field("s2member_access_role", $user_id);
$user_ccaps = implode(",",get_user_field("s2member_access_ccaps", $user_id));
$my_custom_merge_vars = array("S2_LEVEL" => $user_level, "S2_ROLE" => $user_role, "S2_CCAPS" => $user_ccaps);
return array_merge($merge, $my_custom_merge_vars);
}
?>
Jason Caldwell wrote:
- Code: Select all
<?php
add_filter("ws_plugin__s2member_mailchimp_merge_array", "my_filter", 10, 2);
function my_filter($merge, $vars)
{
// $merge /* Array of existing MERGE fields that s2Member passes by default. */
// $vars /* Array of defined variables in the scope/context of this Filter. */
$user_id = $vars["user_id"];
// print_r($vars); // Lots of good stuff in this array.
$user_level = get_user_field("s2member_access_level", $user_id);
$user_role = get_user_field("s2member_access_role", $user_id);
$user_ccaps = implode(",",get_user_field("s2member_access_ccaps", $user_id));
$my_custom_merge_vars = array("S2_LEVEL" => $user_level, "S2_ROLE" => $user_role, "S2_CCAPS" => $user_ccaps);
return array_merge($merge, $my_custom_merge_vars);
}
?>
No, when you fill MERGE fields with data from s2Member, you're dealing with string representations of pieces of data, and NOT with multiple choice options. So I wouldn't try synchronizing multiple choice options with s2Member in this way.cassel wrote:If i want to use ONE list, and as a merge field i have something like "Course registered", i remember that in MC, one field can have choices instead of just a yes or no. So if i have choices like Course A and Course B and Course C, if a member has registered for CourseA last week, and this week registers to CourseB, will BOTH be entered or will the second one overwrite the first one? I am refering to this phrase "...and then add them back in to the same list they were on before, but now with the new details ", so will it ADD the CourseB to CourseA in the MERGE field or replace it?
As for Profile updates, this is something that we're working on already, so I'd hold off on that to prevent your developer from working on something that we're already dealing with.
Users browsing this forum: Google [Bot] and 2 guests