Posted: January 13, 2016 at 5:06 pm
|
Can I bring the event name into a custom field in Infusionsoft? The custom field name is InstructorTrainingCityST If code is involved – I want to verify exactly where to put the code. I have a custom snipit php file that worked for the first function. espresso_only_tag_approved_regs But not working for the next function I added. This is what I have now. Not working for function espresso_infusionsoft_save_date_field($attendee_data) { <?php $clean_attendee_data = array( //Example of a custom contact data field //NOTE: You must prepend custom field database names with an underscore when accessing them through the API ‘_InstructorTrainingDate’ => $attendee_data[‘start_date’], ); return array_merge($attendee_data, $clean_attendee_data); } add_filter( ‘filter_hook_espresso_infusionsoft_extra_attendee_data’, ‘espresso_infusionsoft_save_date_field’, 10, 1 ); |
Hi Terry, This looks like the same issue in the other thread. Your second function is trying to hook to a filter that only exists in Event Espresso 3’s infusionsoft add-on. There’s an equivalent filter hook in Event Espresso 4 and it’s documented here. |
|
|
I guess a better question is: If I take the code you’re directing me to, which phrases do I replace with which name (Infusionsof Field or Event Espresso field)? |
Both, and if you’re not sure how to get the correct field name for a value from Event Espresso, you can add some debugging to your code to find what values are in the $attendee_data object. A very useful tool for this sort of thing is the kint debugger plugin (free to download on wordpress.org). Once installed, you can add something like this to your code:
Then it will output the fields, values, and helper methods that are available to use. |
|
|
What word in the code do I replace with _InstructorTrainingCitySt (my Infusionsoft field name) and what word do I replace with the EE field name? |
Hi there, We tried to add the code to your site using the credentials you sent along with the support token form, but it turns out the credentials were invalid. The code is prepared and posted in this gist: https://gist.github.com/joshfeck/3fb137494e100abc925c Can you copy the code into your site plugin? |
|
Further to the above, it appears that the Infusionsoft API doesn’t accept an incoming custom field if it’s a date type field. I tried formatting the date exactly the same way as the date type field and it didn’t work. What you can do though is make a text field in Infusionsoft and the API will accept it. |
|
The support post ‘Infusionsoft – Bring in the event Name into a custom field’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.