Booking Manager Shortcodes

Shortcodes - Booking Manager plugin


Go to Booking Manager page

Events Listing from .ics feed

[booking-manager-listing url='https://server.com/feed.ics' from='2017-08-06' until='week' until_offset='4h' max=500]

Parameters:

  • url - URL to ics file
  • from (optional) - define from what date to start events listing.

    • Parameter values:
    • any - from any date. Default value.
    • now - from current date/time, like 2017-08-27 12:00
    • today - from today date, like 2017-08-27 00:00
    • week - from start of current week, depending from start week day, wchich you defined at the Settings
    • month-start - from start of current month, like 2017-08-01
    • month-end - from end of current month, like 2017-08-31
    • year-start - from start of current year, like 2017-01-01
    • YYYY-MM-DD - defining specific start date in format like this 2017-08-27
  • from_offset (optional) - offset from start date of listing events. Parameter can be negative.

    • Parameter values:
    • Xd - number of days to offset, where X - days number, like 5d.
    • Xh - number of hours to offset, where X - hours number, like 10h.
    • Xm - number of minutes to offset, where X - minutes number, like 45m.
    • Xs - number of seconds to offset, where X - seconds number, like 30s.
  • until (optional) - define untill what date to list the events.

    • Parameter values:
    • any - untill any date. Default value.
    • now - untill current date/time, like 2017-08-27 12:00
    • today - untill today date, like 2017-08-27 00:00
    • week - untill start of current week, depending from start week day, wchich you defined at the Settings
    • month-start - untill start of current month, like 2017-08-01
    • month-end - untill end of current month, like 2017-08-31
    • year-end - untill end of current year, like 2017-12-31
    • YYYY-MM-DD - defining specific finish date in format like this 2017-08-27
  • until_offset (optional) - offset from end date of listing events. Parameter can be negative.

    • Parameter values:
    • Xd - number of days to offset, where X - days number, like 5d.
    • Xh - number of hours to offset, where X - hours number, like 10h.
    • Xm - number of minutes to offset, where X - minutes number, like 45m.
    • Xs - number of seconds to offset, where X - seconds number, like 30s.
  • is_all_dates_in (optional) - show event, if all events dates or if at least one event date withing conditional paramters from / untill.

    • Parameter values:
    • 0 - show event, if at leat one event date in conditional interval. Default value.
    • 1 - do not show event, if al least 1 day not in conditional interval.
  • max (optional) - maximum number of events to show

Import bookings from .ics feed into Booking Calendar

[booking-manager-import url='https://calendar.google.com/calendar/ical/CALENDAR_ID/public/basic.ics' resource_id=1419  from='today' until='any']

Parameters:

  • url - URL to ics file
  • resource_id (optional) - define ID of booking resource, where to import bookings. By default = 1.
  • import_conditions (optional) - whether import bookings for dates, that already booked in specific booking resource

    • Parameter values:
    • if parameter have skipped, then import in any case
    • if_dates_free - import only, if days are available.

      Please note that in Booking Calendar update 9.9, there is an option called "Import if Dates Available" located at Booking > Settings > Sync > "General" page in the "Import advanced" section. This option duplicates the functionality mentioned. If you skip this parameter in the shortcode and need to import new events regardless of the availability of dates in the source calendar, be sure to deactivate the option "Import if Dates Available" in Booking > Settings > Sync > "General" page as well.

  • from (optional) - define from what date to start events listing.

    • Parameter values:
    • any - from any date. Default value.
    • now - from current date/time, like 2017-08-27 12:00
    • today - from today date, like 2017-08-27 00:00
    • week - from start of current week, depending from start week day, wchich you defined at the Settings
    • month-start - from start of current month, like 2017-08-01
    • month-end - from end of current month, like 2017-08-31
    • year-start - from start of current year, like 2017-01-01
    • YYYY-MM-DD - defining specific start date in format like this 2017-08-27
  • from_offset (optional) - offset from start date of listing events. Parameter can be negative.

    • Parameter values:
    • Xd - number of days to offset, where X - days number, like 5d.
    • Xh - number of hours to offset, where X - hours number, like 10h.
    • Xm - number of minutes to offset, where X - minutes number, like 45m.
    • Xs - number of seconds to offset, where X - seconds number, like 30s.
  • until (optional) - define untill what date to list the events.

    • Parameter values:
    • any - untill any date. Default value.
    • now - untill current date/time, like 2017-08-27 12:00
    • today - untill today date, like 2017-08-27 00:00
    • week - untill start of current week, depending from start week day, wchich you defined at the Settings
    • month-start - untill start of current month, like 2017-08-01
    • month-end - untill end of current month, like 2017-08-31
    • year-end - untill end of current year, like 2017-12-31
    • YYYY-MM-DD - defining specific finish date in format like this 2017-08-27
  • until_offset (optional) - offset from end date of listing events. Parameter can be negative.

    • Parameter values:
    • Xd - number of days to offset, where X - days number, like 5d.
    • Xh - number of hours to offset, where X - hours number, like 10h.
    • Xm - number of minutes to offset, where X - minutes number, like 45m.
    • Xs - number of seconds to offset, where X - seconds number, like 30s.
  • is_all_dates_in (optional) - show event, if all events dates or if at least one event date withing conditional paramters from / untill.

    • Parameter values:
    • 0 - import event, if at leat one event date in conditional interval.
    • 1 - do not import event, if al least 1 day not in conditional interval. Default value.
  • max (optional) - maximum number of events to show
  • delete='skip' (optional) - prevent of deletion of all previous imported bookings, even if you activated option "Trash / delete all imported bookings before new import" at the Booking > Settings > Sync > "General" page.
  • silence=1 (optional) - do not show message: "Imported N bookings" at the page, after import bookings.

Delete imported bookings in specific booking resource of the Booking Calendar

[booking-manager-delete resource_id=1 action='delete']

This shortcode move all previously imported bookings to trash or permanently delete, usually before new import bookings.
It is means that you can insert this shortcode before import shortcode to have the imported bookings always up to date. Even if you modified or deleted the bookings in external sources, like AirBnb, or booking.com websites.
Its can resolve issue of updating deleted and edited events in external sources.

Parameters:

  • resource_id (optional) - define ID of booking resource, where to import bookings (default value = 1).
  • action (optional) - delete or move bookings to trash.

    • Parameter values:
    • trash - move bookings to the Trash (default value).
    • delete - permanently delete all imported bookings of specific booking resource.

Usual configuration to have updated events in the Booking Calendar can be look like this:

[booking-manager-delete resource_id=1 action='delete']
[booking-manager-import url='https://URL_to_AIRBNB/basic.ics' resource_id=1 import_conditions='if_dates_free' from='today' until='any' silence=1]
[booking-manager-import url='https://URL_to_BOOKING_COM/basic.ics' resource_id=1 import_conditions='if_dates_free' from='today' until='any' silence=1]

Comments are closed.