In January, add-ons will be merged into a single PRO version of Easy Booking. The price will change from 99€ (for all add-ons) to 79€/year. If you buy any add-on now, you will be able to upgrade for free (without having to renew the license every year). If you want to avoid migration between plugins, you can also wait for the PRO version to be released.
I have a question about your Google Calendar plugin.
Is there an easy way to create (and update/delete) 2 events instead of 1 event? I extended class-ebc-order-item-event.php, so it was possible to me to create 1 event with the start_date of the booking and 1 event with the end_date of the booking (both only enduring 1 hour)
Unfortunately, the update process doesn’t work any more as there is only 1 stored event_id per order_item, so I have to extend the meta data also to save 2 event ids.
But before I do that, did you maybe already do it or tested that?
The reason why we need this is that the Google Calendar gets very messy with many overlapping bookings. But the only information relevant to us is the start_date and the end_date of the booking as we must plan the pick-up and the return of our rental products. The rest is information we do not need in the calendar.
Oh right, sorry. I’m still not sure to understand but can you use the existing action hooks (easy_booking_calendar_add_order_item_event, easy_booking_calendar_update_order_item_event) to update the second event right after the first one?
it is a little bit more challenging, unfortunately. First, you need a new field in the order item meta for the second id. And many functions explicitely only look at your field, so I had to change that.
But my main problem is to figure out where exactly you store the event id to the order item meta. If I use your functions, I always get the same id in your field (_ebc_event_id) and my custom field (_ebc_event_id2), so an update/delete of “my second event” is impossible.
Can you please give me an advice for that? Thank you!
So the event ID is created by Google in class-ebc-order-item-event.php line 181 and then added to the order item meta. The function add_order_item_meta (in class-ebc-order.php) is hooked to easy_booking_calendar_add_order_item_event. Does that help?