Posted: January 13, 2016 at 5:01 pm
|
I created a custom snipit. I have the code to prevent Infusionsoft from pulling over unapproved contacts. I should be able to put more functions in the same snipit no? Any idea wwhat this isn’t working? /** $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 ); (www.rippedcertification.com) |
Hi Terry, It turns out that the filter hook at the end of the code there is a hook that’s only present in Event Espresso 3. This is a reference that shows an example of using the equivalent hook for Event Espresso 4. Along with that, you should check to make sure that $attendee_data[‘start_date’] has an actual value set. |
|
|
You’re directing me back to the same code I copied. And in one spot you say ‘website’ is the Infusionsoft name, and the following paragraph you say it is the EE name… ? |
|
And also isn’t the start date the date of the event for which they are registering? |
Hi there, Please take a closer look at the code. The code I’m directing you uses the FHEE__EED_Infusionsoft__save_infusionsoft_attendee__extra_attendee_data hook, your code uses the filter_hook_espresso_infusionsoft_extra_attendee_data hook. There is a difference.
Correct, but is that a valid way to get that data? |
|
|
I’m taking code from the forums and documentation and following directions to implement it.
That would be a question I’d have to ask you. |
It isn’t unless you’re setting up the data elsewhere. The code in this gist shows one way to get the event date: https://gist.github.com/joshfeck/3fb137494e100abc925c I mentioned this in your other support thread, but it bears repeating, that the Infusionsoft API does not seem to accept an incoming date for the Date field, even if the format matches exactly. So you may need to use a Text type custom field for the Class Date. |
|
|
Yes, this was the question I was just looking for. When we used Magento the date was pulled into the Date field as a Date field. If it is a text field, we can’t search for events by Date range, or kick off e-mails based on the date. Which is the whole point of bringing the date over. |
Do you happen to have the code that was used in Magneto so we can take a look? |
|
|
Unfortunately no. I can see if I can get it. |
I think I have something that will work, one moment please. |
|
Okay, I’ve updated the code in the gist and it uses a date format that the Infusionsoft API will actually accept. |
|
The support post ‘Infusionsoft Event Date Code not working.’ 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.