Hi Stephen, I need to know if it’s possible to enter manually (or with a function) inside the event database. I need to manipulate single occurrences. I’m am using the pro version of the plugin and i need to check and save only single occurrences of an entire event.
Example = if I have an entire week event, how can I modify only Monday’s data?
Andrea

Andrea Poggetta
Hi Andrea,
What data are you trying to modify? An occurrence only has a start date/time and and end date/time. Venue, description, categories etc are all tied to the event rather than occurrences.
You can, though, break out occurrences from their parent event – but they then become an independent event in its own right.

Stephen Harris
I’ll post a screenshot, maybe I can explain better. http://prntscr.com/9d1afg
So… I have an event that starts at 1st of dec ’15 and finish on jan 31 ’15. In this event there are occurrences every monday from 9 pm to 10 pm, but the last week of the event, the occurrence, starts at 7pm and ends at 9pm. How can I modify only this occurrence without creating a new event only for a day? At least, can you please tell me the function that goes inside the DB and pulls out every single occurrence? I really need to manipulate that data. I use your plugin to manage schools lessons and course.
If you have some hint please tell me. Best Regards
-
This reply was modified 9 years, 3 months ago by
Andrea Poggetta. Reason: The image doesn't work

Andrea Poggetta
You can use eventorganiser_move_occurrence()
– its technically private, but I’m not expecting it to be removed (and if it were, it wouldn’t be until 4.0.0).
The only documentation for it is in the source code, which I’ve copied here:
/**
* Updates a specific occurrence, and preserves the occurrence ID.
*
* Currently two occurrences cannot occupy the same date.
*
* @ignore
* @access private
* @since 2.12.0
*
* @param int $event_id ID of the event whose occurrence we're moving
* @param int $occurrence_id ID of the occurrence we're moving
* @param DateTime $start New start DateTime of the occurrence
* @param DateTime $end New end DateTime of the occurrence
* @return bool|WP_Error True on success. WP_Error on failure.
*/
Alternatively you can enable drag ‘n’ drop of events in the admin calendar: http://wp-event-organiser.com/blog/announcements/custom-times-occurrences/

Stephen Harris