Profile Field Not Fetching?
-
I know very little about PHP, so stick with me
I am using the Mautic (sort of like an open source Mailchimp) plugin to pass some user info to my Mautic instance.
Essentially, I need to set a variable based on the users Phone number to give it to Mautic. I created a BP profile field called Phone. It simply updates the users phone number (in Mautic) to null, however.
The code I am using is below. I know that the Mautic part of the code is right, because I previously used it with the UsersWP plugin, and it passed the right phone number. Any idea why the logic below isn’t passing the right Phone number?
add_filter('wpmautic_tracking_attributes', function(array $attributes) { $bpphone = bp_profile_field_data( 'field=Phone' ); $attributes['phone'] = $bpphone; return $attributes; });
- You must be logged in to reply to this topic.