i purchased the eventon plugin and the ics importer addon. In the ics file i want to import exists the field “category” for each event.
I followed your instructions on
to check the “category” key in the $ics_data array and to check and/or create the wp term (aka. eventon “Event Type” and”Event Type 2″) object for each category name. This works fine. But how can i assign the imported events with the corresponding “Event Type”? I need a hook after the event was stored and therefore has an ID and i need the ics data to this event. Or is it possible to store the “Event Type” IDs temporarily in the event object?
Is there a way to add the “Event Type” to an event when importing with the ics importer addon?
Thanks for your replay!
Feb 8,2017 AT 6:57AM - 3 years ago -
Here is an example
DESCRIPTION:Project xyz Review Meeting Minutesn
Agendan1. Review of project version 1.0 requirements.n2.
of project processes.n3. Review of project schedule.n
Participants: John Smith, Jane Doe, Jim Dandyn-It was
decided that the requirements need to be signed off by
product marketing.n-Project processes were accepted.n
-Project schedule needs to account for scheduled holidays
and employee vacation time. Check with HR for specific
dates.n-New schedule will be distributed by Friday.n-
Next weeks meeting is cancelled. No meeting until 3/23.
I added a filter for “evoics_additional_data_validation” and successfully managed to add the event type found in the “CATEGORIES” value with
$result = wp_insert_term(
‘slug’ => sanitize_title($category)
Now i have an “Event Type” with the name “Feiertag” in this example
But how can i assign the new term/category to the event object?
Is there a chance to get support for my ticket?
Thank you for your messages, I am going to assign this ticket to Ashan and he will be able to take it from here and find you a solution. Please allow some time for him to get back to you, we greatly appreciate your patience and thank you for being a eventon customer!
You know the documentation was lacking on saving part i have updated the doc http://www.myeventon.com/documentation/add-support-additional-ics-fields/ please take a look there are pluggable hook already in place for saving the field values that you can use to run your insert_term() and in the doc step 3 show where it pass the created event id as $post_id
thanks for the update of the documentation page. It helped a lot.
Now i use the action “evoics_save_event_custom_data” with
Inside the function i save the categories from the ics to the post with
wp_set_object_terms( $post_id, $category_name, ‘event_type’);
wp_set_object_terms( $post_id, $category_name, ‘event_type_2’);
ok great. if you have any further questions or concerns please create a new ticket.