latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

About: andrew wise

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing topic 1 (of 1 total)
Topic Count Last Reply
Registration Wont Update Mailchimp Merge Tags 1 2

By:  andrew wise in: Community Forum

voices: 5
replies: 36

4 years, 8 months ago  Cristián Lávaque

Viewing topic 1 (of 1 total)

Topics I've Started

Viewing topic 1 (of 1 total)
Topic Count Last Reply
Registration Wont Update Mailchimp Merge Tags 1 2

By:  andrew wise in: Community Forum

voices: 5
replies: 36

4 years, 8 months ago  Cristián Lávaque

Viewing topic 1 (of 1 total)

My Latest Replies (From Various Topics)

Viewing 16 replies - 1 through 16 (of 16 total)
Author Replies
Author Replies
Posted: Thursday Apr 12th, 2012 at 8:24 am #10651

I can definitely grab someone on Odesk, the problem is, the plugin itself is not behaving the way it should be.

The function process_list_servers() is not being found when I try to invoke it.

Has it been deprecated?

Posted: Wednesday Apr 11th, 2012 at 1:32 pm #10581

Is it possible to pay for 1 on 1 support to help me solve this issue?

Posted: Friday Apr 6th, 2012 at 6:01 pm #10257

I added this code to my functions.php, but I am still getting the error that process_list_server is undefined.

Is this function still supported or has it been deprecated for something else?

I can pay for an hour of consulting just to get this resolved, please let me know.

add_action('init', 's2_mailchimp_merge');


function s2_mailchimp_merge()
{

echo 'age '.  $_REQUEST['AGE'];
			$fields = json_decode(S2MEMBER_CURRENT_USER_FIELDS, true);
			$user_id = $fields['subscr_or_wp_id'];
			$email = $fields['email'];
			$login = $fields['login'];
			$last_name = $fields['last_name'];
			$ip = $fields['ip'];
			
			$quiz = $_REQUEST['QUIZ'];
				$age = $_REQUEST['AGE'];
				$budget = $_REQUEST['BUDGET'];
				$wtgoal = $_REQUEST['WTGOAL'];
				$health = $_REQUEST['HEALTH'];
				$body = $_REQUEST['BODY'];
				$mealtype = $_REQUEST['MEALTYPE'];
				$exercise = $_REQUEST['EXERCISE'];
				$gender = $_REQUEST['GENDER'];
				$first_name = $_REQUEST['FNAME'];
				
				// get the user fields and then update them with the data sent to this page
				$custom_fields = get_user_option("s2member_custom_fields");
				$custom_fields = array(
					'AGE' => $age,
					'BUDGET' => $budget,
					'WTGOAL' => $wtgoal,
					'HEALTH' => $health,
					'BODY' => $body,
					'MEALTYPE' => $mealtype,
					'EXERCISE' => $exercise,
					'GENDER' => $gender,
					'FIRST_NAME' => $first_name
				);
    update_user_option($user_id, 's2member_custom_fields', $custom_fields);
	return process_list_servers('subscriber', '0', $login, 'xxx', $email, $first_name, 'xxx', $ip, 'true', 'false', $user_id);
}
Posted: Wednesday Apr 4th, 2012 at 8:00 pm #10109

Thanks!

Posted: Wednesday Apr 4th, 2012 at 5:17 pm #10099

Eduan,

I’m confused —

I am calling process_list_servers() in a file on my theme, when I call “process_list_servers(…)” it should allow me to use that function unless its not defined

Do I need to define this function in functions.php or add in a hack in MU-Plugins?

Posted: Wednesday Apr 4th, 2012 at 4:19 pm #10082

i just turned on error reporting and it makes sense why it wasnt updating, wordpress cant find the function

Fatal error: Call to undefined function process_list_servers() in /home3/awmoneyc/public_html/dietdecide/wp-content/themes/dietdecide/diet_recommendation.php on line 46
Posted: Thursday Mar 29th, 2012 at 11:22 am #9464

Thanks for the help, I think I’m almost there.

To run this function, do I have to add in a filter? I’m trying to just call it on a random page on my site, but its throwing an error (which i cant see because my shared server does not show php erros).

Here is what I’m calling, and all variables have content.

process_list_servers('subscriber', '0', $login, 'xxx', $email, $first_name, 'xxx', $ip, 'true', 'false', $user_id);
Posted: Tuesday Mar 27th, 2012 at 3:15 pm #9271

Can you show me how to use this function?

process_list_servers($email, $user_id);

i’ve got everything filled out except the password, but its not working, so i must be missing something

process_list_servers('subscriber', '0', $login, '', $email, $first_name, '', $ip, 'true', 'false', $user_id);
Posted: Tuesday Mar 27th, 2012 at 7:15 am #9201

Cristian, thanks for the help well I guess my question is for this function to work properly can you show me an example request?

When I ran it above, I only had 2 parameters included, but I’m assuming I need to have all of the parameters included to have this function initiate itself?

Posted: Monday Mar 26th, 2012 at 4:11 pm #9137

Cristian, can you explain how to use this function?

Here is what I have

// get the user fields and then update them with the data sent to this page
$custom_fields = get_user_option("s2member_custom_fields");
$custom_fields = array(
'AGE' => $age,
'BUDGET' => $budget,
'WTGOAL' => $wtgoal,
'HEALTH' => $health,
'BODY' => $body,
'MEALTYPE' => $mealtype,
'EXERCISE' => $exercise,
'GENDER' => $gender,
'FIRST_NAME' => $first_name
);
update_user_option($user_id, 's2member_custom_fields', $custom_fields);
// update this user based on their email and userid
process_list_servers($email, $user_id);

and then in s2-hacks.php i have this

<?php
add_filter('ws_plugin__s2member_mailchimp_merge_array', 'mailchimp_merge', 10, 2);
function mailchimp_merge($merge, $vars)
{
	$cfields = get_user_option('wp_s2member_custom_fields', $vars['user_id']);

	return array_merge($merge, array('BUDGET' => $cfields['budget'], 'WTGOAL' => $cfields['wtgoal'], 'AGE' => $cfields['age'], 'HEALTH' => $cfields['health_conditions'], 'BODY' => $cfields['body'], 'MEALTYPE' => $cfields['meal_type'], 'EXERCISE' => $cfields['exercise'], 'GENDER' => $cfields['gender'], 'FNAME' => $cfields['first_name']));
}
?>

When I check for the user details in Mailchimp its not updating the.m

  • This reply was modified 4 years, 9 months ago by  andrew wise.
Posted: Monday Mar 26th, 2012 at 2:04 pm #9127

As an add-on to this question, can you help me, here’s what I’m trying to do.

1) user registers for the site by replicating the signup form

2) user details are sent to mailchimp (as completed in the above function)

3) i then take the user to a survey where they have to fill out 5-6 additional questions

4) user submits their information, its stored in s2member_custom_fields

5) the information is then sent to mailchimp to sync

— Basically I just need to be able to run the mailchimp_merge_array through some sort of PHP call so I can sync the data in the wordpress database with what Mailchimp has

Posted: Monday Mar 26th, 2012 at 9:04 am #9108

Perfect, thanks so much for the help!

Posted: Monday Mar 26th, 2012 at 8:17 am #9104

Success!

It worked.

Do you know why it wasn’t working previously? Was the original code sample I used from an older version of the plugin? I’m just trying to learn more about how the plugin is built so I can continue to bolt on the features I need.

Posted: Sunday Mar 25th, 2012 at 11:03 am #9042

Dang, just updated it with the code above and still nothing.

Posted: Saturday Mar 24th, 2012 at 5:43 pm #9017

I added that and registered on the site but I’m not seeing where this information should be printed.

Posted: Saturday Mar 24th, 2012 at 8:27 am #9009

These fields exist in mailchimp.

Viewing 16 replies - 1 through 16 (of 16 total)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.