=== TKJ Appointments ===
Contributors: tkjglobalmedia
Tags: appointments, booking, calendar, scheduling, woocommerce
Requires at least: 5.8
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.3.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let visitors book appointments on your site, and manage the whole diary from your dashboard.

== Description ==

TKJ Appointments turns any page into a booking form. Visitors pick a service, choose who they would like to see, select a free time and enter their details. You get a dashboard calendar, an approval queue and email notifications.

Availability is worked out for you. Set your opening hours once, give each service a length and a gap either side, and the plugin generates the bookable slots, hides anything already taken and refuses double bookings.

= Highlights =

* **Self-service booking** — a four step wizard covering service, staff, date and time, and contact details.
* **Real availability** — weekly opening hours, per-service durations, protected gaps before and after, blackout dates, minimum notice and a booking horizon.
* **Multiple staff** — assign services to people, give anyone their own hours, or let customers pick "any available" and have work shared out fairly.
* **Approval workflow** — hold new bookings as Pending until you approve them.
* **Email notifications** — confirmations, reminders, cancellations and change notices, all with editable templates and a calendar file attached.
* **Calendar files** — proper .ics attachments and downloads so bookings drop straight into Google Calendar, Outlook or Apple Calendar.
* **CSV export** — export the diary, filtered however you are viewing it.
* **WooCommerce payments** — optional. Priced services send the customer to checkout and the slot is held until they pay.
* **Timezone aware** — times are stored in UTC and shown to each visitor in their own timezone. Daylight saving is handled correctly.

= Shortcodes =

* `[tkj_booking]` — the booking form.
* `[tkj_booking service="12"]` — book one specific service.
* `[tkj_booking hide_staff="yes"]` — skip the staff step.
* `[tkj_my_appointment]` — the page customers use to view or cancel their booking.

== Installation ==

1. Upload the `tkj-appointments` folder to `/wp-content/plugins/`, or install the zip through Plugins → Add New → Upload.
2. Activate the plugin.
3. Go to **Appointments → Availability** and set your opening hours.
4. Go to **Appointments → Services** and add what people can book, with a length and a price.
5. Go to **Appointments → Staff** and add the people delivering them.
6. Create a page and add the `[tkj_booking]` shortcode.
7. Create a second page with `[tkj_my_appointment]`, then select it under **Appointments → Settings → General → Manage booking page**.

== Frequently Asked Questions ==

= Do I need WooCommerce? =

No. The plugin works on its own for free bookings and for services you invoice separately. WooCommerce is only needed if you want to take payment at the moment of booking.

= How are double bookings prevented? =

Every slot claim is wrapped in a database lock and re-checked inside it, so two people submitting at the same instant cannot both win. The gaps you set before and after a service are stored on each booking, so they keep protecting that time even if you change the service settings later.

= What happens if someone abandons the checkout? =

The slot is held for the number of minutes you choose, then released automatically so it does not block your diary.

= Is it compatible with High Performance Order Storage? =

Yes. The plugin declares compatibility with both HPOS and the block based cart and checkout, and only ever reads or writes orders through the WooCommerce CRUD API. Appointments live in their own tables, so they are never affected by how WooCommerce chooses to store orders.

= Can staff have different hours? =

Yes. Each staff member can either follow the site-wide opening hours or set their own, including split shifts such as 09:00 to 13:00 and 14:00 to 17:00.

= Will visitors in other countries see the right times? =

Yes. Slots are calculated in your business timezone and displayed in each visitor's local timezone, with the timezone named on screen so there is no ambiguity.

= What happens when the clocks change? =

Appointments are stored as UTC instants, so an appointment never drifts. Local times that do not exist because of a spring-forward jump are never offered.

= Does deleting the plugin delete my bookings? =

Only if you ask it to. There is an opt-in setting under Settings → Advanced; it is off by default.

== Screenshots ==

1. The booking wizard: choose a service, a person, then a time.
2. The month calendar in the dashboard.
3. A single appointment, with status, reschedule and internal notes.
4. Weekly opening hours and blackout periods.

== Changelog ==

= 1.3.0 =
* The plugin speaks 19 languages. Set the site language under Settings → General and every admin screen, the booking form, the customer's manage-booking page and every email follow it: German, French, Dutch, Swedish, Finnish, Danish, Spanish, Italian, Polish, Portuguese, Greek, Czech, Slovak, Hungarian, Romanian, Bulgarian, Croatian, Slovene and Lithuanian, with Austrian German and Belgian French and Dutch. English remains the fallback for anything else.
* Keys issued by Phone Call Desk's EU (Ireland) service are accepted; they carry the UK region, which is where that service's diary lives.

= 1.2.1 =
* The server key now names its region (UK, US or Australia), and the plugin sends its requests to the right Phone Call Desk from the key alone. The address field is normally left blank.

= 1.2.0 =
* Phone Call Desk can be the diary. Under Settings → Phone Call Desk, paste the server key from its Integrations page: the booking form then offers the times its assistant offers, from the same diary, and every booking made here is written there first. Bookings already in this diary can be sent across once.

= 1.1.0 =
* Another system may book, cancel and reschedule with a WordPress application password. Bookings record where they came from.

= 1.0.0 =
* Initial release.

== Upgrade Notice ==

= 1.3.0 =
Adds translations only. Nothing changes on an English site.

= 1.2.1 =
Keys issued from 25 September 2026 carry their region. Older keys keep working.

= 1.2.0 =
Adds the Phone Call Desk connection. Nothing changes until a key is saved.

= 1.0.0 =
Initial release.
