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.

Registration Wont Update Mailchimp Merge Tags

Home Forums Community Forum Registration Wont Update Mailchimp Merge Tags

This topic contains 36 replies, has 5 voices. Last updated by  Cristián Lávaque 4 years, 8 months ago.

Page 2 Of Topic Replies

Viewing 11 replies - 26 through 36 (of 36 total)
Author Replies
Author Replies
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: Wednesday Apr 4th, 2012 at 4:54 pm #10096
Eduan
Username: Eduan
Moderator

Hello Andrew, thanks for the inquiry.

This error is being directed to a function of your theme, not s2Member.

I suggest you re-install your theme in order install it correctly.

Hope this helps. :)

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 7:51 pm #10108

I see. I guess the class wasn’t loaded when you call the function in the theme file. I’ll ask Jason what the best way to include it would be.

Posted: Wednesday Apr 4th, 2012 at 8:00 pm #10109

Thanks!

Posted: Friday Apr 6th, 2012 at 4:48 pm #10254
Staff Member

Thanks for the heads up on this thread.
WordPress plugins are mostly event driven. You can avoid errors like this by simply wrapping any of your own code into an event handler, attached to a WordPress Action Hook.

For example…

<?php
add_action('init', 'my_routine');

function my_routine()
{
    // Any code here that depends on s2Member functions will be fine.
}

?>
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 11th, 2012 at 1:32 pm #10581

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

Posted: Wednesday Apr 11th, 2012 at 8:37 pm #10618

Sorry, we don’t have that service, but you can try sites like oDesk, eLance or jobs.wordpress.net.

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 18th, 2012 at 4:14 am #11075

No, it hasn’t been deprecated. Maybe you’re trying to use it too early, before it was defined…

Viewing 11 replies - 26 through 36 (of 36 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

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.