{"id":5154805,"date":"2014-08-03T05:04:31","date_gmt":"2014-08-03T05:04:31","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/custom-notification-for-user-profile-changes\/"},"modified":"2016-08-21T23:52:18","modified_gmt":"2016-08-21T23:52:18","slug":"custom-notification-for-user-profile-changes","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/custom-notification-for-user-profile-changes\/","title":{"rendered":"custom notification for user profile changes"},"content":{"rendered":"<p>I have followed the instructions here:<br \/>\nhttp:\/\/www.primothemes.com\/forums\/viewtopic.php?f=4&amp;t=2193&amp;sid=dfef67f44c811ad0a6cc3d4160969590&amp;start=25<\/p>\n<p>and here:<br \/>\nhttp:\/\/www.s2member.com\/forums\/topic\/user-profile-change-admin-notification\/<\/p>\n<p>using this code:<\/p>\n<pre><code>add_action (&#039;ws_plugin__s2member_during_configure_user_registration&#039;, &#039;s2_set_default_eot_time&#039;);\nfunction s2_set_default_eot_time($vars = array()) {\n    if (!is_admin() &amp;&amp; $vars[&#039;processed&#039;] === &#039;yes&#039;) {\n        update_user_option($vars[&#039;user_id&#039;], &#039;s2member_auto_eot_time&#039;, strtotime(date(&#039;Y&#039;) . &#039;-12-31&#039;));\n    }\n}\n\nadd_action (&#039;ws_plugin__s2member_during_handle_profile_modifications&#039;, &#039;profile_change_notify&#039;);\nadd_action (&#039;ws_plugin__s2member_during_handle_profile_modifications_4bp&#039;, &#039;profile_change_notify&#039;);\nfunction profile_change_notify ($vars = array ())\n    {\n        $user = new WP_User ($vars[&#039;user_id&#039;]);\n        wp_mail (&#039;myemail@me.com&#039;, &#039;Subject ( &#039; . $user-&gt;user_login . &#039; just updated the Profile )&#039;, &#039;\n\t\tUser Name: &#039; . $user-&gt;user_login . &#039;\n\t\tEmail: &#039; . $user-&gt;user_email . &#039;\n\t\tFirst Name: &#039; . $user-&gt;first_name . &#039;\n\t\tLast Name: &#039; . $user-&gt;last_name . &#039;\n\t\tStreet Address: &#039; . $user-&gt;wp_s2member_custom_fields[&#039;street_address&#039;] . &#039;\n\t\tIngredients: &#039; . $user-&gt;wp_s2member_custom_fields[&quot;ingredients&quot;] . &#039;\n\t\tDay of Week 1: &#039; . $user-&gt;wp_s2member_custom_fields[&quot;day_of_week_1&quot;] . &#039;\n\t\tDay of Week 2: &#039; . $user-&gt;wp_s2member_custom_fields[&quot;day_of_week_2&quot;] . &#039;\n\t\tDay of Week 3: &#039; . $user-&gt;wp_s2member_custom_fields[&quot;day_of_week_3&quot;]&#039;);\n    }<\/code><\/pre>\n<p>wrapped in php tags inside of a plugin file.  When I receive the email, all fields are good except for the ingredients field, which just comes back as &#8220;array&#8221;  How can I display the contents of that array in the email rather than just the text &#8220;array&#8221;?  The field is a check boxes, multi option field if that helps.<\/p>\n<p>https:\/\/wordpress.org\/plugins\/s2member\/<\/p>\n","protected":false},"template":"","class_list":["post-5154805","topic","type-topic","status-closed","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5154805","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5154805\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5154805"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}