| 开发者 | moiseh |
|---|---|
| 更新时间 | 2026年11月27日 03:44 |
| PHP版本: | 7.3 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[wbc-calendar] shortcode.
Attention: this plugin is an add-on for the official WooCommerce Bookings extension. It provides the calendar on your pages, not the booking functionality or the bookable product types.
Premium version ($35 one-time, a year of updates): your customers book straight from the calendar, a list of the upcoming free slots, the price on each slot, and filters by category — see the Premium version.
[youtube https://www.youtube.com/watch?v=m5WRnFfFejw]
Free features:
[wbc-calendar] shortcode — day, week, month and list views[wbc-upcoming] shortcode (view demo)woo-bookings-calendar.zip to the /wp-content/plugins/ directoryYes. The calendar shows the slots of the products of the official WooCommerce Bookings extension, which makes products bookable and takes the bookings. Without it the calendar stays empty, and the plugin says so in your admin.
Check that WooCommerce Bookings is active, that you have at least one published bookable product, and that its availability has free slots in the days shown. The calendar opens on the first day with a free slot, and its "Next available" button jumps to the next one.
Yes. The page can be cached: the calendar loads its slots from the server when it shows, so a cached page still shows the current slots. Those slots are kept a few minutes ("Keep the calendar slots for this many minutes", 5 by default) and worked out again as soon as a booking comes in or a bookable product changes.
Yes, since 1.2.0 — each Bookings Calendar block or [wbc-calendar] shortcode draws its own, for example one per product with [wbc-calendar product="12"].
The slots are kept for a few minutes, so only the first visit of a week or a month works them out. When even that is slow, it is usually the month view of products booked in short blocks (minutes or hours), where WooCommerce Bookings works out every block: use longer booking blocks, or open the calendar on the week or the list view (Settings › Calendar view, or the block's opening view).
Booking straight from the calendar (a booking window opens with the clicked slot chosen), the "Upcoming Bookable Slots" block, the price on each slot, filters by category, a colour per product, a calendar widget, a calendar of the taken slots and a live search. It is $35, paid once, with a year of updates and support and a 7-day money-back guarantee — see it here.
PHP filters (add_filter):
wbc_fullcalendar_options — the FullCalendar 6 options (array)wbc_calendar_start_date — the date the calendar opens on (Y-m-d)wbc_event_row — one event before it goes to the calendar ($event, $post, $product, $availables)wbc_build_events_array — all the events of one request ($events, $products, $start, $end)wbc_booking_products_args — the query of the products the calendar listswbc_bookable_product_types — the product types it lists (default array( 'booking' )) — since 1.0.42wbc_available_colors — the colours of the available slots, one per product ($colors, $product) — since 1.0.42wbc_color_available / wbc_color_unavailable — one product's colour ($product; return a CSS colour)wbc_calendar_class — the calendar element's CSS classeswbc_shortcode_html — the calendar's HTML ($html, and since 1.0.42 the shortcode's $atts)shortcode_atts_wbc-calendar — WordPress's own filter of the [wbc-calendar] attributes — since 1.0.42wbc_frontend_vars — the values handed to the calendar script (WBCVARS)wbc_pre_build_events_array — return an array of events to answer a calendar's request with it, before its free slots are worked out (null, $products, $start, $end) — since 1.2.0wbc_cache_key_fields — the POST fields of the events request that make its cache key (add one a wbc_events_request handler sends) — since 1.2.0wbc_max_request_days — how many days one events request may cover (42) — since 1.2.0document):
wbc_calendar_options (options, $el) — the FullCalendar options, before the calendar is created: callbacks go here — since 1.0.42wbc_events_request (postData, info) — the AJAX request for the events, before it is sent — since 1.0.42wbc_events_loaded (events, info) — the events the server sent, before they are drawn — since 1.0.42wbc_calendar_loaded ($el, calendar) — the calendar is drawn; it is also window.wbcCalendarwbc_event_click (event, jsEvent), and wbc_event_render (event, $element) on document.body[wbc-calendar] shortcode draws its own (only the first one did)[wbc-calendar] shortcode stays)wbc_bookable_product_types and wbc_available_colors filters, the shortcode's attributes through WordPress's shortcode_atts_wbc-calendar filter (and passed to wbc_shortcode_html), and the JavaScript events wbc_calendar_options, wbc_events_request and wbc_events_loaded; all listed in the FAQwc-jquery-blockui handle), and the plugin no longer registers a second copy of it$.trim, .click(), .ajaxSuccess(), .ready()), no stray globals, and the wait for the booking form's date picker stops after a minute instead of polling for everwbc_tab_current), and translations are left to WordPress (no more load_plugin_textdomain())High-Performance order storage compatibility