=== Vachr Appointments - Online Booking System ===
Contributors: chuckumi
Tags: appointment booking, booking system, appointments, reservations, calendar
Requires at least: 5.8
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.18
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Online appointment booking system for doctors, salons and service professionals. Staff calendars, payments, reservations and waiting list.

== Description ==

Turn your WordPress site into a 24/7 booking desk for doctors, private practices, hairdressers, barbers, massage therapists, beauty and wellness providers, and other appointment-based businesses. Clients choose a service, provider and available time online, while you manage schedules, reservations and customer records in one place.

https://www.youtube.com/watch?v=cpkkTJ2zPtQ

Whether you work on your own or run a small team, Vachr Appointments helps cut down on booking calls and message exchanges. Set each provider's availability, let clients book from your site, accept online or offline payments, and use the waiting list to offer newly freed appointments to interested customers.

== External services ==

This plugin connects to external services only when the site owner enables and configures the related feature.

* **Stripe:** When a customer chooses Stripe for an online payment, the site sends Stripe the reservation description and ID, amount, currency, customer email address, and return URLs to create a hosted checkout session. The plugin also asks Stripe for the payment status when processing its webhook. Stripe's [Services Agreement](https://stripe.com/legal/ssa) and [Privacy Policy](https://stripe.com/privacy) apply.
* **Mollie:** When a customer chooses Mollie, the site sends Mollie the reservation description and ID, amount, currency, and redirect and webhook URLs to create a payment. The plugin retrieves that payment's status from Mollie when processing its webhook. Mollie's [User Agreement](https://www.mollie.com/legal/user-agreement) and [Privacy Statement](https://www.mollie.com/legal/privacy) apply.
* **IMAP mailbox:** If the site owner enables email payment import, the site connects to the IMAP server configured by the owner to read bank notification messages and match them to reservations. Mailbox credentials and message contents are sent only to that configured mail server; parsed message contents are not stored by the plugin.

**Booking**

* Public booking form via the `[vachr_appointment_form]` shortcode or a block.
* Each provider has their own working hours, calendar rules, photo, link and phone number.
* Services with their own duration and price; optional overtime surcharge per started 30-minute block.
* Restrict the form to a provider or service and override language or currency with shortcode attributes.
* Hovering a provider icon on the time slots shows a card with an enlarged photo and full name.
* Staff widget `[vachr_appointment_staff]` for booking on behalf of customers, without CAPTCHA or online payment.

**Payments**

* Stripe and Mollie online payments with webhook verification.
* Bank transfer with a bank account per currency and payment instructions in every content language; QR payment codes for Czech (SPAYD), Slovak (PAY by square), Swiss (QR-bill) and other SEPA (EPC) accounts.
* Cash payments.
* Email payment import: match bank notification emails from an IMAP inbox to reservations by number, amount and currency, with a parser profile per bank.

**Customers and reservations**

* Customer records linked to reservations by email, with a searchable directory and contact cards.
* Upcoming reservations separated from appointment history; notes, contact windows and archiving.
* Optional country, street, phone and language fields, each of which can be made required.
* Typed custom fields with translated labels, descriptions and dropdown choices, assignable to each service.

**Waiting list**

* Customers can wait for taken times or for any time.
* When a time is freed they receive an email with a confirmation link; the first to confirm gets it.
* Notify one after another or all at once, with configurable confirmation time and entry lifetime.

**Invoicing and email**

* Printable receipts and proforma invoices with configurable numbering, supplier and tax details and document language.
* Reservation emails and receipts show the final price including surcharges.

**Multilingual and multi-currency**

* Translations: Czech, German, Spanish, French, Italian, Japanese, Dutch, Polish, Portuguese, Russian, Simplified Chinese, Slovak and Ukrainian. English is the source language.
* Multiple currencies with a base currency and configurable content languages.

**Design and protection**

* Appearance settings for accent and surface colors, corner radius and maximum width.
* Built-in CAPTCHA and consent handling on the public form.
* Data is stored in the plugin's own `vachr_appointment_*` tables.

== Installation ==

1. Upload the plugin to `/wp-content/plugins/vachr-appointments` or install it from the Plugins screen.
2. Activate **Vachr Appointments**. Activation creates the plugin's tables.
3. Open **Appointments → Settings** to set currencies, languages and payment methods.
4. Create providers, working hours and services under the Appointments menu.
5. Add `[vachr_appointment_form]` to a page.

== Frequently Asked Questions ==

= How do I show the booking form? =

Add the shortcode `[vachr_appointment_form]` to a page. To restrict it, use for example `[vachr_appointment_form provider="1" service="2" language="cs" currency="CZK"]`.

The Vachr Appointments block supports selecting multiple services and providers. Choose All to remove a restriction. Shortcodes also accept comma-separated IDs, for example `[vachr_appointment_form provider="1,3" service="2,4"]`.

= Can staff book for customers? =

Yes. Put `[vachr_appointment_staff]` on a page. It is shown only to administrators and users with the Appointment staff role.

= Can customers see their reservation online? =

Yes. The confirmation email links to a private reservation page with the appointment details, payment status, bank transfer instructions with a QR code, online payment and the proforma invoice or receipt. Unpaid reservations can switch between the payment methods the provider offers. If you enable cancellation, customers can also cancel there, with fee levels depending on how long before the appointment they cancel.

= Which payment methods are supported? =

Stripe, Mollie, bank transfer, cash and automatic matching of bank notification emails.

== Screenshots ==

1. Customers choose a service and provider.
2. Customers choose an available date and time; taken times can be added to the waiting list.
3. Customer details, appointment summary and price, including an overtime surcharge when applicable.
4. Manage and filter appointment reservations.
5. Set up a provider, including their profile and calendar rules.
6. Review waiting-list entries.
7. Search and manage customer records.
8. Configure payment methods and bank accounts by currency.
9. Configure IMAP email import for matching bank payments to reservations.
10. Configure currencies, provider approval and custom booking fields.

== Changelog ==

= 1.0.18 =
* Fixed the reservation page labels for the provider and date and time.
* Updated the affected translations in all bundled languages.

= 1.0.17 =
* Customers can cancel a reservation themselves from their reservation page. Switch it on in Settings > Cancellation.
* Configurable fee levels: for example free cancellation at least 48 hours before the appointment, a 50 % fee at least 24 hours before, and either no online cancellation or a fixed fee for shorter notice. Fees are a percentage of the reservation total.
* The customer sees the fee levels and what cancelling costs right now, and confirms before the reservation is cancelled. The time is freed for the waiting list.
* The customer, the site owner and the provider get an email with the amount to refund or to collect. Refunds and fees are not moved automatically. The reservations list shows the fee and refund.
* A payment that arrives after the customer cancelled keeps the reservation cancelled and notifies the site owner.
* Free reservations now also get the link to the reservation page when cancellation is enabled.
* Translations of all new texts into all bundled languages.

= 1.0.16 =
* Translations of the new appearance settings and preview into all bundled languages.

= 1.0.15 =
* Appearance settings: choose from eight ready-made themes (including two dark ones) and three designs, and fine-tune colors for the form, calendar days and available or occupied times, text, background, corner radius, width and font size.
* Live preview of the booking form (calendar, times, fields, summary) with a desktop and mobile view, updated as you change the settings.

= 1.0.14 =
* Reservations that need the provider's approval (overtime or provider confirmation enabled) now send the customer an email right away, saying the reservation awaits confirmation or decline, with a link to the reservation page. The customer is emailed again once the provider decides.
* New customer reservation page: the confirmation email links to a private page with the appointment, status, price, payment (bank transfer with QR code, online payment or cash, changeable while unpaid) and the proforma invoice or receipt.
* Custom fields can be assigned to each service: tick the fields to show in the booking form of that service. Existing services keep showing all fields until saved.
* Bank transfers: add a bank account per currency (IBAN, BIC, account holder). An account without a currency is the default for currencies without their own account, and a bank transfer is offered only for currencies that have an account.
* Bank transfer instructions can be written separately for every content language, with placeholders such as {holder}, {iban}, {amount} and {reference}. When left empty they are generated from the account and translated.
* QR payment codes follow the country of the IBAN and the currency: Czech QR payment, Slovak PAY by square, Swiss QR-bill and EPC QR for other SEPA accounts. IBANs with an invalid check digit are reported and get no QR code.
* Email payment import: one parser profile per bank, selected by the sender address or domain, each with its own reference, amount and currency patterns. The previous single setting is converted to a profile automatically.
* Fixed the payment QR code not being drawn on the public pages and the receipt.
* Fixed saving one settings tab clearing the options of the other tabs (for example payment gateway keys and invoicing details).
* Fixed email translations falling back to the site language after a nested language switch.

= 1.0.13 =
* Each working-hours row can have an optional break (e.g. lunch); no reservation can overlap it.

= 1.0.11 =
* The Vachr Appointments block supports multiple services and providers, including filtered availability and waiting lists. Existing single selections remain supported; shortcodes accept comma-separated IDs.
* Providers can choose how paid overtime is booked: standard booking, filling from the earliest time with a configurable maximum gap, or charging for each unfilled started 30-minute overtime block before the appointment.

= 1.0.10 =
* Removed the unused license-key activation system. Appointment booking features no longer ask for a license key or contact a license server.
* Updated the plugin introduction to speak directly to doctors, salons, independent professionals and small service teams.

= 1.0.9 =
* Provider edit page: Save and Archive toolbar, step buttons and cleaner field layout with photo preview.
* Providers have a new optional phone number.

= 1.0.8 =
* Hover card with enlarged photo and full name for providers on time slots.
* Providers have a new optional link.

= 1.0.7 =
* Searchable country calling code, country and language fields.
* Phone, street, country and language can each be required.

= 1.0.6 =
* Customers can store a country, street and language; the booking form can ask for them.

= 1.0.5 =
* Waiting list for services, with its own settings and admin page.

= 1.0.4 =
* Customer records, directory, contact cards, notes, custom fields and reservation history.

= 1.0.3 =
* Optional overtime surcharge per currency and per started 30-minute block.

== Upgrade Notice ==

= 1.0.18 =
Fixed reservation page labels and updated their translations.

= 1.0.17 =
New: customers can cancel their reservation from the reservation page, with configurable fee levels (off by default, Settings > Cancellation). The database gets two new columns on update.

= 1.0.16 =
The new appearance themes and live preview are now translated.

= 1.0.15 =
Booking form appearance: ready-made themes, more color options and a live preview in the settings.

= 1.0.14 =
Custom fields per service, bank accounts per currency, translated transfer instructions, QR codes for CZ, SK, CH and SEPA accounts, bank-specific email parser profiles and a fix for settings being cleared when saving another tab.

= 1.0.10 =
Appointments no longer require or check a license key. The refreshed description explains who the plugin is for.

= 1.0.9 =
Provider edit page improvements and an optional provider phone number.
