Setting Up WooCommerce Bookings
WooCommerce Bookings adds time slot booking system: service appointments, rentals, consultations, tours. Product becomes "bookable resource" with schedule, availability, rules.
Plugin Data Model
Bookings works with three entities:
- Bookable product — product with configured slots and prices
- Booking — specific entry: who, when, which product, status
- Resource — additional resource attached to product (e.g. specific master or room)
Data stored in wp_posts (type wc_booking) and wp_postmeta. Availability schedule in _wc_booking_availability meta.
Booking Types
On product creation choose duration type:
| Type | Application |
|---|---|
| Fixed blocks | Fixed-size slots (30 min, 1 hour) |
| Customer-defined | Client chooses arbitrary duration |
| Fixed duration days | Hotel nights, rental days |
For daily rental: duration = 1 day, min duration = 1, max duration = 14. Cost multiplied by nights number.
Availability Rules
Availability set via rules with priorities:
Rule 1: All days → Bookable (low priority)
Rule 2: Saturday, Sunday → Not bookable
Rule 3: 2025-12-31 → Not bookable (holiday)
Rule 4: Monday 09:00–18:00 → Bookable
Filter via hook:
add_filter('wc_bookings_product_is_available', function($is_available, $start, $end, $qty, $product) {
// custom logic: check external calendar, CRM etc.
return $is_available;
}, 10, 5);
Resources and Multiple Booking
Resources are independently available units of one product. Example: "Haircut" service with resources "Master Anna" and "Master Sergey". Each resource has own schedule and can add surcharge.
Parameter has_persons: true enables people selection, min_persons / max_persons limit range. Price can be recalculated per person.
Google Calendar Sync
Bookings supports two-way sync with Google Calendar via official add-on. Scheme:
- New booking → creates event in Google Calendar via Calendar API
- Google Calendar event → on next sync blocks slot in Bookings
Requires Google Cloud Console: project, OAuth 2.0 credentials, enabled Calendar API. Sync runs via WP-Cron every 15 min or forced.
Timelines: single service with simple schedule — 1 business day. Multiple resources, Google Calendar, custom fields, pricing logic — 3–4 days.







