Appointment SW

Description

Appointment SW lets visitors book appointments from any page on your site. You configure as many working windows per day as you need, block holidays, optionally allow guest bookings, and Appointment SW takes care of slot availability, email notifications and capability checks.

Version 2.0 is a deep modernisation of the original plugin while keeping every shortcode, option and database table from 1.x in working order. Existing sites can update without re-doing setup.

What’s new in 2.0

  • Modern booking flow: clicking a free slot opens a confirmation modal — no more page reloads to advance the booking.
  • Admin booking modal with live client search and an inline “Add client” button, so receptionists can book a brand new client without leaving the calendar.
  • Arbitrary number of time windows per day (not just two).
  • Server-rendered Settings page using the WordPress Settings API, with an onboarding section that creates the shortcode pages for you in one click.
  • Public REST API under /wp-json/appointmentsw/v1/ for availability, bookings, holidays, settings, and user search.
  • Capability-based permissions: appointmentsw_manage (administer) and appointmentsw_book (book a slot).
  • Prepared statements across every database query, plus new indexes on bookings, bookmeta and holidays for faster lookups on busy calendars.
  • Hardened request dispatcher: strict capability checks, sanitized input and escaped output throughout.
  • Filterable email templates via appointmentsw/email/{event}/{audience}/{subject|body}.
  • Optional WooCommerce integration is now a separate companion plugin so this core stays lean.

Shortcodes

  • [appointmentsw_form] — booking form for visitors.
  • [appointmentsw_myaccount] — logged-in user appointments (view and cancel).
  • [appointmentsw_admin] — frontend admin calendar with client search and one-click client creation.
  • [appointmentsw_vacations] — block holidays from the frontend.

Backwards compatibility

All 1.x shortcodes keep rendering, bundled Bootstrap 3 assets are still enqueued so existing theme overrides keep working, the legacy core/ classes remain loaded, and legacy options (asw-guest, asw-duration, asw-numdays, asw-maxoffset, asw-start_time_*, asw-end_time_*) are migrated transparently into the new appointmentsw_settings option the first time the new code reads them.

Screenshots

Installation

  1. Upload or extract the appointmentsw folder into /wp-content/plugins/, or install from the ww.wp.xz.cn plugin directory.
  2. Activate from the Plugins menu.
  3. Go to Appointment SW Settings to configure duration, working time windows, guest bookings and the admin notification email.
  4. In the same screen, scroll down to Frontend pages and click Create page next to each shortcode you want available. The plugin creates a published page containing the shortcode and remembers the assignment.

That’s it. Visitors can now book from the booking page, and you can manage everything from [appointmentsw_admin] without ever leaving the calendar.

FAQ

Will the 2.0 update break my existing site?

No. Every shortcode, legacy option and database table is preserved. The bundled Bootstrap 3 assets stay enqueued, so any theme customisation built on those classes keeps rendering. We test new installs and 1.3 upgrades side by side before each release.

How do administrators book an appointment on behalf of a client?

Place [appointmentsw_admin] on a page (the Frontend pages section in Settings does this for you). Click a free slot to open the booking modal, type the first letters of the client’s name or email in the search box, pick them and confirm. If you need a brand new client, click + Add client in the calendar toolbar and create them inline — they appear in the search instantly.

Can guests book without an account?

Yes. Enable Allow guest bookings in Settings. Guests will be asked for name and email in the booking modal.

Where do I find the REST API?

Under /wp-json/appointmentsw/v1/. Routes: availability, bookings (GET|POST|DELETE), holidays (GET|POST|DELETE), settings (GET|POST), users/search and users (manage capability required).

How are bookings notified?

The plugin sends an HTML email to the booking user and a notification to the admin (configurable in Settings). Subject and body of every notification are filterable: appointmentsw/email/created/user/subject, appointmentsw/email/created/user/body, and the equivalents for canceled and admin.

I customised the bundled Bootstrap 3 classes in my theme. Should I worry?

No. Bootstrap 3 is still bundled in 2.0 to avoid breaking themes that rely on its classes. We may opt-deprecate it in a future major release but with plenty of warning.

How do I uninstall and remove all data?

Set the option appointmentsw_delete_data_on_uninstall to true before deleting the plugin. Without that opt-in, Appointment SW keeps your bookings, holidays and settings on uninstall.

Reviews

There are no reviews for this plugin.

Contributors & Developers

“Appointment SW” is open source software. The following people have contributed to this plugin.

Contributors

Translate “Appointment SW” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.

Changelog

2.0.0

  • Settings: server-rendered Settings page (Settings API) with support for an arbitrary number of working time windows per day.
  • Onboarding: Frontend pages section that creates and assigns the shortcode pages in one click.
  • Booking flow: modal confirmation replaces the multi-step page reload. Reservations now go through the REST API.
  • Admin booking flow: modal with live user search (debounced) and inline client creation directly from the calendar toolbar.
  • Capabilities: introduced appointmentsw_manage and appointmentsw_book, granted automatically to existing roles on activation.
  • REST API v1 under /wp-json/appointmentsw/v1/ with availability, bookings, holidays, settings and users endpoints.
  • Database: new indexes (status_datetime, user_id, book_id in bookmeta, date in holidays), created_at/updated_at audit columns, rebuilt bookmeta primary key to allow multiple meta values per booking.
  • Security: hardened legacy request dispatcher with strict capability checks, sanitisation and escaped output everywhere.
  • Bugfixes carried over from 1.x: corrected meta_key placeholder type, fixed malformed placeholders in holidays SQL and WHERE … IN (%d) queries, removed double-quoted placeholders in prepare, replaced direct $_REQUEST['user_email'] access with sanitised input.
  • Compatibility: Bootstrap 3 still bundled; legacy shortcodes preserved as-is; legacy asw-* options migrated on first read.

1.3

  • WordPress 6.4.3 compatible.
  • Bundled Bootstrap updated.

1.2

  • Added dashboard Pages section.
  • Added dashboard Appointments section.
  • Added [appointmentsw_vacations] shortcode.

1.1

  • Added the option to make an appointment without being registered.

1.0

  • Initial release.