• For a customer I am working on a booking system for renting out boats. I am using Woocommerce Bookings for this and would like to have a modification to combine the availability of different products.

    The boat can be rented for half days, full days or a week. Since Woocommerce Bookings cannot create variations, the easiest solution would be to create multiple bookable products for 1 boat, as follows:

    Boat for rental half day product 1
    Boat for rental one day product 2
    Boat for rental 2 days product 3
    Boat for rental 3 days product 4
    Boat for rental 4 days product 5
    Boat for rental 5 days product 6
    Boat for rental 6 days product 7
    Boat for rental 7 days product 8

    So far this is all possible, but the availability of the individual products must be linked to each other to avoid double bookings. For example, if the boat is booked for 1 day (product 2) on 5 April, the rest of the products should no longer be available on 5 April. I solved the half days by using resources:

    Half day in the morning from 10am to 1.30pm.
    Half day in the afternoon from 14:00h to 21:30h.

    Question is to find a piece of code to get this done, I have googled a lot and looked around here and found pieces of code like add_post_meta(55, ‘_wc_booking_availability’, $availabilities); //Individual Product One, but I do not know how to add it and get it to work.

    Hopefully someone can help me with this.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Woocommerce Bookings create multiple products with same availability dates’ is closed to new replies.