| 开发者 | moiseh |
|---|---|
| 更新时间 | 2026年11月12日 21:12 |
| PHP版本: | 4.8 及以上 |
| WordPress版本: | 7.1 |
| 版权: | 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.
[youtube https://www.youtube.com/watch?v=Gu797uhZKXQ]
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/ directoryWhen it happens the most common issue is the user is viewing calendar in Month mode, and bookable products are divided by small blocks of days, hours or minutes. This cause heavy CPU load to calculate events availability, and the solution is to set higher Booking duration blocks, or/and limit the calendar to display only in Day or/and Week mode.
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)document):
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 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