📥 Gratis at afprøve

Klinik Booking System

Komplet WordPress-bookingsystem til terapeuter og klinikker.

Se priser og planer

14 dages gratis prøveperiode — ingen kreditkort krævet

📌 Version 1.72.107 — August 2026 🇨🇰 WordPress-plugin ✅ PHP 7.4+ 🔒 GDPR-klar
Hvad er inkluderet

Alt du behøver til klinikkens booking

✓
Online booking of appointments directly from the website
✓
Supports multiple therapists/practitioners with individual calendars
✓
Flexible day blocking: full day, morning only, afternoon only, or online-only
✓
Hidden services with deep link — bookable only via a shared URL, not shown in the public list
✓
Two-way calendar sync with Google Calendar
✓
Two-way calendar sync with Microsoft 365 / Outlook
✓
CalDAV support for other calendar systems
✓
Automatic prep and cleanup time around appointments
✓
iCal attachment in confirmation emails, so clients can easily add the appointment to their own calendar
✓
Integrated Microsoft Teams meeting for online appointments
✓
Integrated Zoom meeting for online appointments
✓
Automatic meeting link in confirmation and reminder emails
✓
Card payment via Stripe
✓
Payment via MobilePay
✓
Flexible MobilePay capture: immediate or reservation-only
✓
Deposit payment (partial upfront payment at booking)
✓
Automatic invoicing with sequential numbering
✓
Gift card sales — amount-based or service-based
✓
Automatic remaining-balance tracking on amount-based gift cards
✓
Sale of treatment packages (multiple sessions bundled)
✓
Discount and package codes at booking
✓
Automatic email to both buyer and recipient on gift card purchase
✓
Ability to resend the confirmation email for gift cards/packages if the original wasn't received
✓
Automatic booking confirmation emails
✓
Automatic reminder emails 26 hours before the appointment
✓
Notification on cancellation or change of booking
✓
Admin notification on new bookings and sales
✓
Multi-language support — emails and forms adapt to the client's language
✓
Encryption of calendar access tokens (Google/Microsoft) with AES-256
✓
CSRF protection on all forms
✓
GDPR tools: data retention rules, anonymization, and advance notice
✓
Full self-service portal for clinic owners
✓
Manage your own therapists, services, and opening hours
✓
Own booking overview and calendar management per clinic
✓
Therapist portal with magic login — no password required
✓
Own payment settings (Stripe/MobilePay) per clinic
✓
Own invoicing and accounting overview
✓
Discount code management
✓
Automatic onboarding upon subscription signup
✓
Self-service subscription management (cancel/resume)
✓
Standalone WordPress plugin — installable on your own website
✓
Automatic updates directly in wp-admin
✓
Open hooks/filters for customization without touching core code

Installation på 4 trin

1

Download ZIP

Hent plugin-filen ovenfor — ingen registrering krævet.

2

Upload til WordPress

Gå til Plugins → Tilføj ny → Upload plugin og upload ZIP-filen.

3

Aktivér og licensér

Aktivér pluginnet og indtast din licensnøgle under Indstillinger.

4

Konfigurér og gå live

Tilføj behandlere, ydelser og shortcode — klar til bookinger.

Versionshistorik

Se hvad der er nyt i de seneste versioner.

v1.72.97 August 2026 SENESTE
▼
  • **🐛 BUGFIX: weekday headers in the Clinic overview/Calendar overview ("Mon, Tue, Wed...") stayed in Danish even with English selected.** Reported by Søren with a screenshot after v1.72.96's translation pass — the day names were hardcoded as a plain JS array in both `portal-app-klinik-oversigt.php` and `admin-bookings-calendar.js`, entirely outside WordPress's translation system.
v1.72.96 August 2026
▼
  • **Clinic overview/Calendar overview — visual and UX refinements requested by Søren after live testing:**
  • No changes to the v1.72.95 security gate (`klinikoversigt_is_safe()`) or any AJAX/scoping logic — purely template, CSS, and JS presentation changes plus the translation catalog.
v1.72.95 August 2026
▼
  • **🔴🔴🔴 CONFIRMED ROOT CAUSE + IMMEDIATE MITIGATION: Clinic overview was leaking cross-clinic therapist/booking data platform-wide on the SaaS installation.** v1.72.93 and v1.72.94's caching/service-worker theories were investigated in good faith but turned out not to be the actual cause — the real bug was found by inspecting tb-saas' own scoping code directly, confirmed with Søren via screenshots showing an active superadmin impersonation session during one repro.
v1.72.94 August 2026
▼
  • **🔴🔴 SECURITY HARDENING (continued from v1.72.93): the PWA service worker (`portal-sw.js`) was itself caching personal/multi-tenant data locally on-device, independent of any server-side caching.** After shipping v1.72.93's server-side `nocache_headers()` fix, Søren reported the wrong-clinic data was still showing — on his phone specifically, not on desktop. Root cause: the service worker's "network first, cache as offline fallback" strategy for both `admin-ajax.php` calls and portal-page navigation wrote every successful response into the local Cache Storage, unconditionally. Any network hiccup afterwards (far more common on mobile data than on a desk connection) fell back to that locally cached copy — which could easily be a stale response captured during earlier testing under a different clinic/therapist. This is a per-device, client-side cache and is completely unaffected by server-side `Cache-Control` headers, so it needed its own fix.
v1.72.93 August 2026
▼
  • **🔴🔴 SECURITY HARDENING (high priority): the therapist portal (`/tpadmin/`) sent no cache-control headers at all, on either its normal shortcode render path or its "naked" render path.** Reported by Søren: on mobile, Clinic overview showed bookings and therapist names from clinics he wasn't logged into via that session, while the same URL on desktop showed the correct, properly-scoped clinic. This is almost certainly a **pre-existing cross-session/cross-tenant caching issue affecting the whole therapist portal, not something new in Clinic overview** — Clinic overview is simply the first section to display multiple people's names in one view, making a cache mix-up visible for the first time. Other sections (Upcoming bookings, History, etc.) only ever show "your own" data, so the same underlying issue could just as easily have been serving one therapist's client bookings to a different therapist, silently.
v1.72.92 August 2026
▼
  • **🔴 BUGFIX: Calendar overview/Clinic overview (v1.72.91) showed every therapist in the same colour.** Reported by Søren with screenshots from both wp-admin and the therapist portal (tb-saas). Root cause: newly created therapists all default to the same `color` value (`#c9a96e`, see `class-tb-admin-therapists.php`), which is fine for single-therapist contexts but made the new side-by-side calendar useless once two or more therapists shared the untouched default.
  • **🔴 BUGFIX: Clinic overview (therapist portal) didn't follow the clinic's selected design theme — filter box and calendar grid rendered as a mismatched dark block inside an otherwise correctly-themed card.** Reported by Søren with a tb-saas screenshot. Root cause: the new section used `var(--bg-card)` for its own surfaces, which — on at least this clinic's theme configuration — resolved inconsistently with the surrounding `.card`'s own `var(--bg2)` background (a real, separate design-token gap, not something this session tracks down further; flagged below).
v1.72.91 August 2026
▼
  • **NEW: "Calendar overview" (clinic booking overview) — a week-based time-grid calendar showing all (or selected) therapists' bookings side by side, in BOTH wp-admin and the therapist portal.**
  • **wp-admin:** new tab under Bookings → Calendar overview (`admin/class-tb-admin-bookings-calendar.php`, `admin/bookings/page-calendar.php`, `admin/admin-bookings-calendar.js`). Deliberately built as new, standalone files rather than extending `class-tb-admin-bookings.php` (516 lines) or `admin-bookings.js` (already over the 600-line warning threshold) — same file-size discipline as the Events design-tab extraction.
  • **Therapist portal (tpadmin):** new "Clinic overview" section, visible to every logged-in therapist — shows the whole clinic's bookings, not just their own (`class-tb-therapist-portal-ajax-overview.php`, `sections/section-klinik-oversigt.php`, `portal-app-klinik-oversigt.php`). Own script file, per the established pattern (`portal-app.php` is already over the 1,000-line critical limit and is not touched).
  • Therapist selection is filterable via checkboxes (colour-coded using each therapist's existing `color` field) and is remembered per user: wp-admin stores the choice in `usermeta`; the therapist portal stores it directly on the therapist's own `tb_therapists` row (new `calendar_overview_prefs` column — therapists aren't WP users, so `usermeta` isn't available to them).
  • `TB_Booking::get_all()` gained an additive, backward-compatible `therapist_ids` (array) argument alongside the existing single `therapist_id`, used by the new week-data queries.
  • SaaS company-scoping is automatic and required no tb-saas changes: both new AJAX endpoints resolve the "allowed" therapist ID list via `TB_Therapist::get_all()` (already scoped through the existing `tb_therapists_where` filter) and intersect it with the requested selection before querying — a manipulated request can never reach another clinic's therapists.
  • New idempotent migration: `tb_therapists.calendar_overview_prefs TEXT NULL`.
v1.72.90 August 2026
▼
  • **🔴 BUGFIX: `TB_Course::delete_product()` had no safeguards — a course product linked to an event could be deleted, breaking the event.** Reported by Søren: a course could be deleted while still linked to an event via `tb_events.linked_course_product_id`. Same unconditional-delete pattern as `TB_Service::delete()` (v1.72.88) and `TB_Therapist::delete()` (v1.72.89).
  • `TB_Course::delete_product( $id )` now returns `true|WP_Error`. Blocks deletion if:
  • Also now cleans up `tb_course_product_services` on successful delete (previously left orphaned rows — same "ghost link" bug class as the other two fixes).
  • Caller updated: `admin/class-tb-admin-courses.php::delete_course_product()` — new `delete_error` notice on the courses admin page.
  • See tb-saas v2.9.110 for the matching Shell refactor.
v1.72.89 August 2026
▼
  • **🔴 BUGFIX: `TB_Therapist::delete()` had the same missing safeguard as `TB_Service::delete()` (v1.72.88) — unconditional hard delete, no future-bookings check.** Flagged as a related finding while fixing the service-delete gap; handled now at Søren's request.
  • `TB_Therapist::delete( $id )` now returns `true|WP_Error` instead of `void`. Blocks deletion if the therapist has upcoming, non-cancelled bookings (`tb_bookings.status != 'cancelled' AND booking_date >= CURDATE()`).
  • Caller updated: `admin/class-tb-admin-therapists.php::delete_therapist()` now shows a `delete_error` notice on the therapists list page instead of silently deleting (or silently doing nothing useful) regardless of outcome. No therapist-portal self-service delete exists for this one (only wp-admin calls `TB_Therapist::delete()`), so only one call site needed updating.
  • See tb-saas v2.9.109 for the matching Shell refactor (delegates to this method instead of duplicating the future-bookings check, mirroring the v2.9.108 service-delete refactor).
v1.72.88 August 2026
▼
  • **🔴 BUGFIX: `TB_Service::delete()` had no safeguards at all — unconditional hard delete.** Reported by Søren while reviewing tb-saas' new service-delete feature (tb-saas v2.9.107): the SaaS Shell had built its own future-bookings/course-product safety checks on top of a direct `$wpdb` bypass of this method, duplicating logic that belongs here so it protects standalone plugin customers too, not just SaaS clinics.
  • `TB_Service::delete( $id )` now returns `true|WP_Error` instead of `void`. Blocks deletion if:
  • Also now cleans up `tb_discount_services` on successful delete (previously left orphaned rows — same "ghost link" bug class that `TB_Therapist::delete()` fixed for `tb_therapist_services` in v1.72.29).
  • Both callers updated to surface the new error: wp-admin (`admin/class-tb-admin-services.php` — new `delete_error` notice on the services list page) and the therapist portal's self-service delete (`class-tb-therapist-portal-ajax-services.php::ajax_delete_service()` — error message now reaches the existing `errMsg()` JS handler unchanged).
  • **Not yet fixed (separate, related finding):** `TB_Therapist::delete()` has the same "no future-booking check" gap — flagged for a future TB Admin UI session, out of scope here.
  • `admin/class-tb-admin-services.php` is now **671 lines** (was 654, already flagged) — 🔴 split required before the next feature added to this file.
  • See tb-saas v2.9.108 for the matching Shell refactor (delegates to this method instead of duplicating its checks).
v1.72.87 August 2026
▼
  • **🔴 BUGFIX: "Primary background" in Events design had no visible effect.** Reported by Søren. Root cause: `--tb-ev-bg` was computed and set as a CSS variable in `class-tb-event-shortcode.php`, but nothing in the actual markup ever consumed it — only `--tb-ev-card-bg` ("Card background") was applied to anything visible. The same oversight existed in the admin design-tab's live preview (`class-tb-admin-events-design.php`), which read the `bg` field into a JS variable but applied `bgCard` to the preview wrapper instead.
  • **Fix:** `[tb_events]`'s outer grid container (the element wrapping all event cards) now actually uses `background: var(--tb-ev-bg)`, giving "Primary background" a real effect — it's the page-level background behind/around the cards, while "Card background" remains each individual event card's own background. The admin preview now shows the same two-layer structure (outer wrapper = Primary background, inner card = Card background) instead of collapsing both into one box.
  • See tb-saas v2.9.104 for the matching portal-preview fix (same root cause, same JS pattern was copied into the SaaS design tab).
v1.72.86 August 2026
▼
  • **Feature: Events design tab now supports full granular colour override, matching the booking design tab.** Previously the Events design tab (TB core admin → Events → Design) only offered a choice of the 7 preset themes; individual colours could not be overridden. Now supports the same 13 colour fields (backgrounds, text, accent, borders, status colours), corner radius, and Google Font as `admin/settings/tab-design.php` — same "Reset" buttons and live preview pattern.
  • **File split:** `render_design()`/`save_design()` extracted from `admin/class-tb-admin-events.php` (931 lines, flagged for splitting before the next feature) into a new `admin/class-tb-admin-events-design.php`.
  • New `TB_Design_CSS::get_events_resolved_colors()` — mirror of `get_resolved_colors()`, resolves the `tb_events_design` option (theme + overrides) instead of `tb_booking_design`.
  • `[tb_events]` shortcode (`class-tb-event-shortcode.php`) now uses the resolved colours instead of only the theme preset, and gained a `--tb-ev-radius` CSS variable (was hardcoded 8px/4px throughout) plus optional Google Font import/`font-family`.
  • Storage format change: `tb_events_design` option now stores a full design array (`theme` + 13 colour fields + `radius` + `font_url` + `font_family`) instead of just `array('theme' => $key)`. Backward compatible — a site with only `theme` saved still resolves correctly (missing/empty override fields fall back to the theme's defaults).
  • No change required in tb-saas' `scope_events_design()` filter (`class-tbs-scope.php`) — it already passes the whole option value through unchanged, regardless of its shape. See tb-saas v2.9.102 for the matching per-clinic portal UI.
v1.72.85 August 2026
▼
  • **Fix: growing backslashes in Design tab's "Font name" and "Google Font URL" fields on repeated save.** `admin/settings/tab-design.php`'s save handler read `$_POST['tb_d_' . $f]` directly, without `wp_unslash()`. WordPress always adds slashes to `$_POST` (`wp_magic_quotes()`); since the "Font name" field commonly contains single quotes (e.g. `'Lato', sans-serif`), each save round-tripped through the input added one more layer of backslashes to the stored value — same root cause as the earlier documentation-fields fix. Now wraps the read in `wp_unslash()` before sanitizing, matching the convention already used elsewhere in the plugin (e.g. `therapist-booking.php`'s locale handling).
  • Not a self-healing fix for already-corrupted values: any site with an already-slashed `tb_booking_design` option needs the affected field(s) re-entered and saved once after updating.
v1.72.84 August 2026
▼
  • **New: neutral SaaS hook in `[tb_events]`'s AJAX registration JS.** If `window.tbEvCompanyId` is defined (only ever set by tb-saas, on a company's dedicated events page — see tb-saas v2.9.95), it's now appended as `tbs_company_id` in the `tb_event_register` AJAX POST — same fallback pattern `booking.js` already uses via `TB.tbs_company_id`. No-op for standalone plugin customers, who never set that global. Requested to support building a separate, company-scoped public events page in tb-saas.
v1.72.83 August 2026
▼
  • **New: Events is now clearly marked as BETA** — Søren wants to keep testing/developing before it goes fully into production. Sidebar menu item now reads "Events (BETA)", and the Events admin page heading shows a small "BETA" badge as well, so the status is visible both from the menu and while actually on the page.
v1.72.82 August 2026
▼
  • **Feature: course products can now be linked to multiple services, not just one.** Requested by Søren with a concrete example: a course should be able to cover both "Couples therapy" and "Couples therapy Online" — previously only one could be chosen.
  • New many-to-many table `tb_course_product_services` (product_id, service_id). Idempotent creation via `dbDelta()`, plus an automatic one-time backfill on `plugins_loaded`: every existing course product's current single `service_id` is copied into the new table, so existing courses keep working with zero manual action required.
  • The old `tb_course_products.service_id` column is kept (now documented as legacy) — set to the first-selected service purely for backward-compatible display in places that haven't been updated to read the new multi-service list. It no longer governs what a course code can be redeemed against.
  • **Redemption behavior change:** a course code is now valid for booking against *any* of its product's linked services, not just the single service that happened to be on the product at time of purchase. `TB_Course::validate_for_booking()` now checks membership in the full linked-service list (via the new join table) instead of exact equality against one stored ID.
  • Admin course product form (Courses → New/Edit course): single "Service" dropdown replaced with a scrollable multi-select checkbox list ("Services"). Requires at least one selected — server-side validated, redirects back with a notice if none chosen (the previous single-select relied on the browser's `required` attribute, which doesn't apply cleanly to a checkbox group).
  • `TB_Course::get_products()` / `get_product()` now attach `->service_ids` (array) and `->service_name` (comma-joined names, same property name as before for backward compatibility with existing display code) via a new `attach_services()` helper.
  • `[therapist_courses]` shortcode switched from its own raw query to `TB_Course::get_products()`, so it automatically shows all linked services (comma-separated in the existing pill) with no further changes needed.
  • Not tested in a real WordPress installation yet — verify: create/edit a course product with 2+ services selected, confirm both save and re-display correctly; purchase (or use an existing) course and confirm the code can be redeemed at step 6 against either linked service; confirm an existing (pre-upgrade) course product still shows its original single service correctly after the automatic backfill.
v1.72.81 August 2026
▼
  • **Split of `public/js/booking.js` (1,067 lines, well over the mandatory 1,000-line threshold — overdue since two sessions ago).** Regular file-split (move HTML to templates) doesn't apply here since it's pure JS logic with no markup to extract; the file is a single jQuery IIFE with a shared closure scope (`state` object and helper functions used across every flow), which is what made a naive split unsafe without prior dependency analysis (see handover notes from the previous two sessions).
  • **Approach:** introduced a shared namespace object `window.TB_Booking`, created by `booking.js` and consumed by a new `public/js/booking-checkout.js`. `booking.js` exports its shared `state` object reference and helper functions (`showStep`, `showDone`, `escHtml`, `formatPrice`, `t`, `kr`, `pad`) onto the namespace; `booking-checkout.js` aliases them locally at the top of its own IIFE so none of the moved function bodies needed to change internally — pure relocation, not a rewrite.
  • **Split boundary (deliberately coarse — 2 files, not a finer per-domain split — to minimize risk on a revenue-critical, client-facing flow with no automated test coverage in this environment):**
  • `isNonceError()`/`retryWithFreshNonce()` (from v1.72.79's cache-independent nonce retry) are also exported from `booking-checkout.js`, since `initCancelPage()` in `booking.js` needs them too and the cancellation page never loads step 6.
  • `TB_Shortcodes::enqueue()` registers the new script as `tb-public-checkout` with `array('jquery','tb-public')` as its dependency array — guarantees `booking.js` (which creates the namespace) always loads and executes first.
  • Verified: brace/parenthesis balance in both files, and a full diff of all 41 top-level function names before vs. after the split confirms none were lost, duplicated, or renamed.
  • Not tested in a real WordPress installation yet — this touches the entire client-facing booking form (all three flows: therapy booking, gift card purchase, course purchase) plus the cancellation page, so a full run-through of each flow end-to-end is essential before considering this closed.
v1.72.80 August 2026
▼
  • **Fix: the booking cancellation page and event cancellation page (reached via the "Cancel booking" / "Cancel registration" link in emails) did not follow the clinic's chosen design theme — always showed the same hardcoded dark colors regardless of what was selected in Settings → Design.** Root cause: `TB_Ajax_Payment::handle_cancel_page()` and `TB_Event_Ajax::handle_cancel_page()` render a fully standalone `` document directly (reached via `?tb_action=cancel` / `?tb_action=event_cancel` on the `init` hook), bypassing normal WordPress page rendering entirely — so `TB_Design_CSS::inject()`, which normally injects the selected theme's CSS variables on `wp_head`, never runs for these pages. Only the accent color was ever pulled from settings; everything else (backgrounds, text, borders, alert colors) was hardcoded to the "Dark" theme's original palette.
  • New `TB_Design_CSS::get_resolved_colors()` — resolves the currently active theme (preset + any saved per-color overrides from Settings → Design) into a plain color array, for use by contexts that render outside normal WP page output and therefore can't rely on `wp_head`. Built on `get_theme_presets()` (the complete 7-theme source), not on `inject()`'s own local theme array — so, as a side effect, these two cancellation pages correctly support the "Black-White" (mono) themes that `inject()` itself still doesn't (pre-existing, separate issue, out of scope here — see note in `class-tb-design-css.php`). `inject()` itself is untouched.
  • Both cancellation pages now derive all colors, corner radius, and (if set) the custom font from the resolved theme instead of hardcoded hex values. The "Cancel" button keeps a fixed danger-red regardless of theme (deliberate — stays legible as a destructive action even on the black/white mono themes where the accent color is black or white).
  • Tested and confirmed by Søren: selecting a non-default theme now correctly reflects on both the booking cancellation page and the event cancellation page.
v1.72.79 August 2026
▼
  • **Fix: booking failed intermittently with "Security error. Reload the page and try again." and reloading the page did not help.** Root cause: the booking form's nonce (`wp_create_nonce('tb_booking_nonce')`) is baked into the page HTML at load time via `wp_localize_script`, and is only valid for up to 24 hours. On installations using a full-page cache (confirmed on this client's site: One.com's Performance Cache plugin, which uses Varnish with a **default TTL of 30 days**), the cached HTML — and its embedded nonce — can be served for far longer than the nonce's own lifetime. Once the cache is older than ~24h, every booking attempt against that cached page fails with the security error, until the cache happens to be purged/regenerated — matching the reported "periodic" pattern. A reload does not help because it simply re-serves the same stale cached page with the same expired nonce.
  • **Fix, cache-independent by design:** new AJAX action `tb_get_nonce` (`TB_Ajax_Booking::get_nonce()`) issues a fresh nonce on demand. `admin-ajax.php` POST requests are not cached by Varnish/similar full-page caches, so this endpoint always returns a current nonce regardless of how stale the surrounding page HTML is. `booking.js`: if `create_booking` or `cancel_booking` returns the security error, the client now silently fetches a fresh nonce via this endpoint, updates `TB.nonce`, and retries the original request **once** in the background — the visitor never sees the error. Chosen over a hosting-level cache-exclusion because it works regardless of caching configuration (and doesn't rely on remembering to configure exclusions correctly, on this host or any future one).
  • **Separate pre-existing bug found and fixed along the way:** `cancel_booking`'s AJAX call in `booking.js` never sent a `nonce` field at all, even though `check_ajax_referer('tb_booking_nonce', 'nonce')` was added to the handler as a CSRF fix in an earlier version (see CHANGELOG entry "Security A1"). This meant every cancellation attempt failed unconditionally with the same security error — unrelated to caching. Now sends `TB.nonce` and benefits from the same auto-retry logic above.
  • Not tested in a real WordPress installation yet — verify on the affected client's site: confirm bookings succeed even against a stale cached page (hard to reproduce without waiting out or manually manipulating the Performance Cache), and confirm booking cancellation now works at all (previously always failed).
v1.72.78 August 2026
▼
  • **Replaced v1.72.77's MobilePay-only reservation approach with a simpler, unified policy — no payment is ever attempted at waitlist signup time, regardless of payment method; a fresh Stripe payment link is emailed only once a spot actually opens up.** Søren's explicit call: since reservation couldn't be implemented consistently for both gateways, he preferred one predictable flow over an asymmetric one (MobilePay reserves, Stripe rejects).
  • `TB_Event_Ajax::register_linked_course()`'s waitlist branch no longer branches on payment method at all — it never creates a payment order of any kind, simply confirms the waitlist spot and tells the person clearly that they don't need to pay now and will receive a payment link by email if/when a spot frees up.
  • `TB_Event_Registration::finalize_promoted_linked_course()` (called from the existing promotion logic — unchanged) is reworked: instead of capturing a reservation, it now generates a **fresh** Stripe Checkout session at the moment of promotion and emails a "You've got a spot — pay to confirm" link (new `TB_Email_Events::send_promoted_course_payment_link()`). The course stays unactivated until that payment actually completes — confirmed via the same `CR-` Stripe webhook handling already built in v1.72.76 (which activates the course and marks the linked event registration paid in one step, unchanged). A free (0 kr.) linked course skips the payment link entirely and activates immediately on promotion.
  • New idempotency guard added to Stripe's `CR-` webhook handler (`'pending' !== $course->status → return`), matching the one MobilePay already got in v1.72.77 — general robustness, and specifically relevant now that promotion can trigger a second wave of `CR-` payments.
  • v1.72.77's MobilePay reservation filter (`force_reservation_for_waitlisted_course()`) is now dormant — no `CR-` order is ever created while a registration is still on the waitlist, so the filter never has anything to act on. Left in place rather than removed (per the no-blind-deletion rule) — harmless as dead code, documented clearly in the surrounding comments so a future session isn't confused by it.
  • Confirmed (no code change needed): once payment completes, the course row's status flips from `pending` to `active` via the existing `TB_Course::activate()` — since the row already exists in `tb_courses` from the moment of the original waitlist signup, it's already visible in Courses' "Sold courses" admin list throughout, just with an updated status once paid.
  • Not tested in a real WordPress installation yet — verify: register for a full course-linked event and land on the waitlist (confirm no payment prompt appears at all), then free up a spot and confirm the promotion email with a working Stripe payment link arrives, and that the course/event only activate after that link is actually paid.
v1.72.77 August 2026
▼
  • **New: waitlisted signups for a course-linked event now reserve payment instead of not charging at all — money is only actually withdrawn once a spot opens up.** Builds on v1.72.76's course-linked events. Previously, any waitlisted registration (linked or not) simply wasn't charged at all until confirmed; Søren asked specifically for course-linked waitlist signups to genuinely *reserve* the amount rather than defer charging entirely.
  • **MobilePay**: fully implemented using existing infrastructure, no new payment plumbing. Vipps' ePayment API always authorizes (reserves) before a separate capture call — `TB_MobilePay::create_payment()` already behaves this way. New `TB_Event_Registration::force_reservation_for_waitlisted_course()` hooks into the **existing** `tb_mobilepay_capture_mode` filter (already used by the global booking capture-mode setting) to force `'off'` (reservation-only, no auto-capture) specifically for a `CR-` order tied to a still-waitlisted course-linked registration — zero changes to `class-tb-mobilepay.php`'s booking-flow logic itself. The `CR-` webhook handler now checks whether the linked registration is still on the waitlist and, if so, skips activation/confirmation emails entirely (just logs) instead of activating a course nobody has a confirmed spot for yet. New idempotency guard (`'pending' !== $course->status → return`) also prevents duplicate activation emails if Vipps redelivers a webhook — a general robustness improvement, not just for this feature.
  • When the waitlisted person is later promoted (existing promotion logic in `cancel_registration_by_token()`/`cancel_single_registration()`, unchanged), new `TB_Event_Registration::finalize_promoted_linked_course()` fires: captures the reserved MobilePay payment, and only activates the course + sends confirmation emails if the capture succeeds. If capture fails (e.g. the reservation expired), the course is deliberately **not** activated — logged for manual follow-up rather than silently handing out a paid spot for free.
  • "Pay at the clinic" needs no reservation mechanism at all — the course simply stays unactivated until promotion, then activates directly with no payment step (unchanged principle, now applied consistently to the waitlist case too).
  • **Stripe is explicitly NOT supported for this** — this codebase has no existing authorize-now/capture-later mechanism for Stripe, and building one has a real footgun: card holds typically expire after ~7 days, which would silently and incorrectly fail for anyone waitlisted longer than that. Rather than build a partial/unreliable implementation, choosing Stripe while landing on the waitlist for a course-linked event now returns a clear error asking the person to choose MobilePay or "Pay at the clinic" instead. Flagging this explicitly rather than leaving a silent gap.
  • Not tested in a real WordPress installation yet — this touches live payment reservation/capture behavior and should be verified carefully in MobilePay test mode: register for a full course-linked event (waitlist), confirm the app shows a *reservation* (not a charge), then free up a spot and confirm the reservation is captured and confirmations are sent only at that point.
v1.72.76 August 2026
▼
  • **New: an event can be linked to a paid course product from Courses — signing up for the event becomes a real course purchase, and buying the course directly auto-registers for the linked event.** Genuinely cross-component work spanning Events AND TB Booking Flow's course/purchase infrastructure (`class-tb-course.php`, `class-tb-ajax-products.php`, `class-tb-mobilepay.php`, `class-tb-stripe.php`) — flagged here and should be flagged in `handover-tb-booking.md` too, since several of those files were touched from this Events session. Three architecture decisions confirmed with Søren before building: (1) a linked event's price is **always** the course's price (server-enforced, not just UI — `TB_Event::save()` overrides any submitted price when a course is linked), (2) only **one** active event/series can be linked to a given course product at a time (enforced at save-time via new `TB_Event::course_product_already_linked()`, shown as a form error rather than failing silently), (3) a linked event uses the **course's** payment methods (MobilePay/Stripe/Pay at the clinic) instead of the event's own (which include "Pay on arrival") — for consistency with ordinary course purchases.
  • New `tb_events.linked_course_product_id`, `tb_event_registrations.linked_course_id`, `tb_courses.linked_event_cancel_token` columns (idempotent `ALTER`s).
  • **Direction 1 (event signup → course purchase):** new `TB_Event_Ajax::register_linked_course()` — creates a real `TB_Course::create()` row alongside the event registration(s), reuses the **existing** `CR-` order-id/payment pipeline unchanged (Stripe/MobilePay/`pay_at_clinic`) rather than inventing new payment plumbing. The `CR-` webhook handlers in `class-tb-mobilepay.php`/`class-tb-stripe.php` now check for a linked event registration after activating the course and activate/confirm that too, in the same webhook call.
  • **Direction 2 (course purchase → event signup):** new `TB_Event_Registration::maybe_register_for_linked_event_by_course_purchase()` — called from `class-tb-ajax-products.php::purchase_course()`'s immediate-activation paths (free/`pay_at_clinic`) and from both `CR-` webhook handlers' "not already linked from an event" branch, so it fires exactly once regardless of payment method. Registers for the whole series if the linked product is tied to a multi-day series. The new registration is marked paid immediately (the course purchase already covers it); if the event is full, the buyer lands on the event's waitlist but keeps the course regardless.
  • New "Based on course" picker in both the single-event form and the v1.72.74 series bulk-edit form (shared `render_course_link_field()`), auto-fills and locks the price field via JS when a course is selected, hides the event's own payment-method checkboxes (irrelevant once linked).
  • `[tb_events]` now shows the course's payment methods (with "Pay at the clinic" wording) instead of the event's own for a linked event, plus a short note that signing up is a course purchase.
  • Known limitation: if someone registers for the event directly first and *later* buys the linked course separately, the duplicate-registration guard (v1.72.62) silently skips creating a second registration — they get the course but the purchase isn't cross-linked to their existing signup. Acceptable edge case, not solved in this pass.
  • ⚠️ `admin/class-tb-admin-events.php` is now **931 lines** — well past the point where a split should have already happened (flagged repeatedly since v1.72.72/74). Strongly recommend making this the very next piece of work before any further Events features.
  • Not tested in a real WordPress installation yet — this is the largest, most cross-cutting change made in this module so far and should be tested thoroughly end-to-end in both directions, with real MobilePay/Stripe test-mode payments, before relying on it in production.
v1.72.75 August 2026
▼
  • **Fixed: a serious pre-existing bug — editing any single date of a series via the normal per-date edit form silently stripped its `series_id`, making the whole series disappear from the admin tree overview.** Reported by Søren as: "publish a series, then manually set every date back to draft — the parent event vanishes." Root cause: `TB_Admin_Events::save_event()` (the ordinary single-event edit form's save handler) never included `series_id` in the data passed to `TB_Event::save()`, and `TB_Event::save()` falls back to `NULL` whenever that key is absent entirely — so saving *any* edit to an existing series date (not just a status change) silently detached it from its series, regardless of what was actually changed. Likely present since Phase 1 (v1.72.49), only surfaced now that the admin tree view (v1.72.72) made a missing `series_id` visibly break something. Fix: `save_event()` now fetches the event's current `series_id` before saving and carries it through unchanged whenever editing an existing event — series creation (for brand-new events) is unaffected, and `save_series()` (the v1.72.74 bulk-edit form) was never affected, since it already set `series_id` explicitly.
  • This also resolves the second half of Søren's request — reverting a published event to "Draft" was never actually blocked by any validation (the status dropdown already allowed it); the only problem was the series-detaching side effect above. No separate "allow draft after published" feature was needed.
  • **Fixed: the admin tree's parent-event row showed a summed participant count (a person registered for all 3 days of a series counted as "3"), not a unique-participant count.** New `TB_Event_Registration::get_unique_participant_counts_for_series()` — counts `DISTINCT cancel_token` per status across all dates in a series (one signup, whether it covers 1 or all days, always shares one `cancel_token` — see `do_register()`), so the row now shows the actual number of people. Labelled "unique participants" in the UI to make the distinction clear against the per-date rows below, which still show raw per-date counts (correct there — the same person legitimately occupies a seat on each date they're registered for).
  • Not tested in a real WordPress installation yet — this fix in particular should be verified end-to-end: create a series, publish it, edit an individual date (e.g. revert to draft and back), and confirm the series stays grouped as one parent event throughout.
v1.72.74 August 2026
▼
  • **New: "Edit" on the parent-event row now edits the WHOLE series at once.** New `?page=tb-events&edit_series=ID` view (`render_series_form()`) with the fields that are SHARED across the series: title, description, delivery method/venue/host, price, capacity, extra registration fields, payment methods, show-on-website. Deliberately WITHOUT date/time (each date keeps its own start/end, unchanged by this form) and WITHOUT status (still controlled via "Publish whole series"/"Cancel whole series" or individual per-date editing).
  • New `TB_Admin_Events::save_series()` — fetches each date-event's own `start_datetime`/`end_datetime`/`status` and preserves them unchanged, while updating the rest identically for all dates via the same `TB_Event::save()` a normal single-event edit uses — meaning, among other things, automatic Zoom/Teams meeting creation still happens correctly for dates that are missing a meeting link.
  • **New: individual "Cancel this date" links directly in the confirmation email** for a multi-day signup — no longer necessary to click through to the cancellation page and choose there (that option still exists, via the general "Cancel" link at the bottom). `TB_Event_Registration::do_register()` now stamps each event object with its own `registration_id`, so the email can build a precise per-date link (`?tb_action=event_cancel&token=…&reg=ID`).
  • The cancellation page now visually highlights the specific date if the link came from one of the new per-date links in the email (pure UX improvement — the actual cancellation still only happens via POST confirmation, not directly from the GET link, for the same security reason the whole page already followed).
  • ⚠️ `admin/class-tb-admin-events.php` is now **819 lines** — well past the 600-line threshold, and growing with every new Events admin feature. Strongly recommend a dedicated split session before the next addition (e.g. extract `render_series_form()`/`save_series()` into their own file, same pattern as `class-tb-admin-events-participants.php`).
  • Not tested in a real WordPress installation yet.
v1.72.73 August 2026
▼
  • **New: "Publish whole series"** on the parent-event row in the admin overview — the counterpart to "Cancel whole series" (v1.72.72). New `TB_Event::publish_series()` sets every date currently marked 'Draft' to 'Published' in one go (doesn't touch already-published or cancelled dates). Triggers automatic Zoom/Teams meeting creation for each date that's an online event, just like a normal single publish.
  • The button only shows when the series actually has draft dates to publish.
  • ⚠️ `admin/class-tb-admin-events.php` is again just over 600 lines (625) — not urgent, but worth keeping an eye on.
  • Not tested in a real WordPress installation yet.
v1.72.72 August 2026
▼
  • **File split (prerequisite for this work — both files were over the 600-line threshold):**
  • **New: the admin overview now shows multi-day series as a tree structure** — one parent event per series (combined title, date range, combined participant count across all days, combined status) with expandable sub-rows (one per date, "Show dates"). Reuses `TB_Event::get_grouped()` (already used by `[tb_events]`).
  • **New: "Cancel whole series"** on the parent row — new `TB_Event_Registration::cancel_series()` sets every date's status to 'cancelled' and cancels all active registrations. New `TB_Email_Events::send_admin_series_cancellation()` sends **one** combined cancellation email per unique participant (deduplicated on `cancel_token`) instead of one per date — a participant registered for the whole series gets one email listing all the dates they've lost.
  • **New: "Export all dates"** on the parent row — new `TB_Event_Registration::export_series_participants_csv()`, same CSV recipe as the existing per-date export, but with an extra "Date" column and all dates' participants combined into one file.
  • **New: individual cancellation of single dates.** The public cancellation page (`?tb_action=event_cancel`) now shows, for a multi-day signup, each active date with its own "Cancel this date" button, PLUS a combined "Cancel ALL dates" button (unchanged from v1.72.55). New `TB_Event_Registration::cancel_single_registration( $token, $registration_id )` — verifies ownership via token, cancels only the specific date, promotes the waitlist for that one date. New `TB_Email_Events::send_single_date_cancellation()` is explicit about WHICH date was cancelled and how many dates the participant is still registered for.
  • **The admin participant list** now shows, when a participant is registered for more than one date, BOTH a "Cancel this date" and a "Cancel whole series" button (decided with Søren — both options are kept, neither is removed).
  • No database changes in this version — everything builds on the existing schema.
  • Not tested in a real WordPress installation yet — this was a large, cohesive change (two file splits + four new features in the same pass); recommend a thorough test round, especially of the cancellation/cancellation-email flow itself, before production.
v1.72.71 August 2026
▼
  • **Fix: the "X active steps" badge was never translated — a genuine bug
  • **More serious, caught during the fix:** the custom Python `.mo`
  • **Root-cause fix:** rewrote the compiler to parse plural blocks
  • **Verification this time was exhaustive, not spot-checks:** every one
  • **Lesson for future translation work in this repo:** any extraction
v1.72.70 August 2026
▼
  • **New: English translations for the flexible 3-tier notification
  • Same 48 msgids also appended to `languages/therapist-booking.pot`
  • `.mo` recompiled. No `msgfmt`/`polib` available in this environment —
  • **Deliberately NOT translated in this pass — pre-existing gaps,
v1.72.69 August 2026
▼
  • **New: 3 neutral hooks so a multi-tenant Shell can scope the GLOBAL `tb_notification_rules` table.** Unlike `tb_therapists`, `tb_services`, `tb_course_products` and `tb_giftcard_products`, this table had no `company_id` column and no filter hooks at all — a real multi-tenancy gap for the fallback layer of the 3-tier notification system (v1.72.63–68), found and fixed together with tb-saas in a joint SaaS Shell session. Booking-level and service-level rules needed no change — they're already scoped transitively via `booking_id`/`service_id`, which point into already-scoped tables.
  • `apply_filters( 'tb_notification_rules_where', '1=1' )` — added to `TB_Reminder::get_global_rules()`'s SELECT and `save_global_rules()`'s DELETE. Same pattern as `tb_events_where`/`tb_therapists_where`. No listeners = unchanged behavior.
  • `apply_filters( 'tb_notification_rule_insert', $data, $table )` — added to the shared `insert_rules()` helper, lets a Shell stamp extra columns (e.g. `company_id`) onto rows inserted into the global table specifically.
  • `apply_filters( 'tb_notification_global_rule_scope', '', $rule )` — added to `process_rule()`'s global branch. Needed because the hourly cron (`run_hourly_check()`) has no per-request "active company" context (unlike the other `_where` hooks, which run inside a request already bound to one company) — this lets a Shell restrict one specific global rule row to only match bookings of its own company, while rule rows without a company owner keep acting as a shared fallback for everyone (preserves current single-tenant-style behavior for existing installs).
  • No schema change in core — `company_id` on `tb_notification_rules` is added by the Shell (idempotent ALTER), same as `tb_therapists`/`tb_bookings`/`tb_services`.
v1.72.68 August 2026
▼
  • **Fix to a misunderstanding from v1.72.63–65: the notification system now has a 3rd layer — service-specific setup.** Søren clarified that "override global" was meant to apply per-service (in the service catalog), not only per-booking, which had already been built. Priority order is now: **booking-specific** (if set) → **service-specific** (if set on the booking's service) → **global default**. Each layer is a full replacement of the next, not a merge — the same principle the booking override already followed.
  • New table `tb_service_notification_rules` (same structure as `tb_booking_notification_rules`, keyed on `service_id`). `tb_notification_sent.rule_source` ENUM extended with `'service'` (idempotent `ALTER ... MODIFY COLUMN`, since `dbDelta()` doesn't always update ENUM values on existing installations).
  • `TB_Reminder::get_effective_rules()` now looks up all 3 layers. `run_hourly_check()` restructured into 3 passes (global → service → booking), each correctly excluding bookings/services already covered by a higher-priority layer. The `insert_rules()` helper generalized to support all three rule tables (global/service/booking) via a shared scope-column parameter.
  • **wp-admin:** new "🔔 Notifications" button per service in the service catalog (`admin/class-tb-admin-services.php`, "Services" page) — same step UI as the booking modal. The file is now **654 lines** — crossed the 600-line warning threshold in this session.
  • **Therapist portal:** same button in the Services section, but visible ONLY to the therapist who created the service (same ownership rule as Edit/Delete — a service's notification setup applies to ALL bookings for that service, regardless of therapist, so only the creator can adjust it). `portal-app-notifications.php` extended (not a new file) with a shared `makeRowSet()` factory reused by both dialogs (booking + service) to avoid duplicating the row-building logic.
  • The badge in the Bookings → Reminders table now distinguishes between "Own setup" (booking level) and "Service setup" (service level).
  • Not tested in a real WordPress installation yet.
v1.72.67 August 2026
▼
  • **Fix: the cancellation note box in the reminder email still didn't follow the theme** (found by Søren while testing v1.72.66 — the broader pass had missed this box because it used different hex codes than the other findings). `class-tb-email-reminder.php`'s "Want to cancel?" box was hardcoded to `#2a2018`/`#c9a96e`/`#c8c0b4` (dark/gold), unchanged by the previous fix. New shared CSS class `.tb-box-accent` (a card with a left accent border, for important notes) added to `wrap()` and used here.
  • Full review of all remaining hex colors in `class-tb-email-reminder.php`, `class-tb-email-booking.php`, `class-tb-email-events.php`, `class-tb-email-courses.php` confirmed no further occurrences — only the deliberately-unchanged Zoom/Teams/phone brand boxes (fixed light background, not theme-dependent) and the gift card graphic's own design system remain, both intentionally.
  • Not tested in a real WordPress installation yet.
v1.72.66 August 2026
▼
  • **Fix: emails now fully follow the selected booking design theme, not just the accent color.** `TB_Email_Core::wrap()` (the shared HTML wrapper for ALL outgoing emails) previously only pulled the accent color from `tb_booking_design` — background, card background, body text color, and borders were hardcoded to the old "dark gold" look regardless of the selected theme. Reported by Søren: with the "Black-White Light" theme selected, the title text (black accent) became nearly invisible because it landed on the hardcoded dark background. `wrap()` now derives ALL colors via `TB_Design_CSS::get_theme_presets()` — the same source the portal itself uses — so emails match the selected theme 1:1.
  • Added `color-scheme`/`supported-color-schemes` meta tags (computed automatically from background brightness) to prevent mail clients (Apple Mail, Outlook, etc.) from guessing their own dark-mode look for the email. Gmail's own proprietary dark-mode heuristic cannot be guaranteed 100% neutralized by any known technique — this is best practice, not a guarantee across all clients.
  • Found and fixed several OTHER occurrences of the same "doesn't follow theme" bug, discovered while reviewing all email templates: `send_update()` (booking-changed email) had its OWN fully hardcoded table styling, separate from the `.details` class the other booking emails use — rewritten to the same pattern. New shared CSS classes `.muted`, `.tb-box`, `.tb-code-box` added to `wrap()`'s stylesheet and used to fix hardcoded muted-text colors and accent boxes in booking, event, and course emails (payment-pending box, course-code box, footer notes).
  • **Deliberately not touched:** the gift card graphic itself (`TB_Email_Giftcards::render_gc_card()`) has its own separate design system (3 fixed designs: minimal/warm/elegant, configured via the gift card designer) and is NOT part of the booking portal's theme — this is an intentional difference, not a bug. Only the ordinary email text outside the card graphic itself was fixed.
  • Not tested in a real WordPress installation yet.
v1.72.65 August 2026
▼
  • **New: therapist-portal UI for booking-specific notification overrides — Phase 3 of 3 (completes the flexible notification system).** Builds on v1.72.63 (data model/engine) and v1.72.64 (wp-admin UI). See `handover-tb-booking.md`.
  • **⚠️ Component crossing, deliberately done in this session (Booking Flow chat), flagged in both `handover-tb-booking.md` and `handover-tb-admin.md` per the cross-component rule:** the therapist portal (`includes/therapist-portal/`) is normally TB Admin UI's territory. Agreed with Søren upfront to build all three phases together as one coherent feature rather than splitting across chats.
  • New "🔔 Notifications" button on each booking row in the portal's "Upcoming bookings" list — opens a dialog identical in behavior to the wp-admin one (v1.72.64): shows the booking's effective rules (its own override if any, otherwise the global rules as an editable suggestion), lets the therapist add/remove steps, and can clear the override to fall back to global.
  • New file `includes/therapist-portal/portal-app-notifications.php` — a deliberately **separate** `` block (own IIFE), following the same pattern established for `portal-app-calendar.php`/`portal-app-services.php`: `portal-app.php` is already over the 1,000-line mandatory-split threshold, so new portal JS keeps landing in its own small file rather than growing that monolith further.
  • New AJAX endpoints `tb_therapist_get_notification_rules` / `tb_therapist_save_notification_rules` in `class-tb-therapist-portal-ajax-booking.php`, registered both as `wp_ajax_` and `wp_ajax_nopriv_` (therapists aren't WP users). Ownership enforced server-side exactly like the existing edit/delete-booking endpoints: `booking->therapist_id !== $therapist->id` → rejected, a therapist can only see/edit notification rules for their own bookings.
  • ⚠️ `includes/therapist-portal/portal-dashboard.php` is now **765 lines** — over the 600-line warning threshold (was already close before this session, at 743 per the previous handover). No split done this session; flagged for a future TB Admin UI session, consistent with that file's normal ownership.
  • Not tested in a real WordPress installation yet.
v1.72.64 August 2026
▼
  • **New: wp-admin UI for the flexible notification system — Phase 2 of 3.** Builds on the data model/engine shipped in v1.72.63. See `handover-tb-booking.md`.
  • **Bookings → Reminders → "Global notification steps":** the old single checkbox + one text field is replaced with a repeatable list of steps. Each step: type (`Before appointment` / `After visit`), hours, message mode (`Standard text` / `Custom text` with its own textarea), enabled toggle. "+ Add step" adds rows client-side; save replaces the entire global rule set (delete + reinsert, indexed via matching array keys across the five posted fields per row — simpler and more robust than trying to diff against existing rows).
  • **New "🔔 Notifications" button per booking** in the bookings list — opens a modal showing that booking's *effective* rules (its own override if one exists, otherwise the global rules shown as an editable starting suggestion). Saving creates/replaces a booking-specific override; "Reset to global default" clears it (booking falls back to global on the next cron run). New AJAX endpoints `tb_get_booking_notification_rules` / `tb_save_booking_notification_rules` (new `admin-bookings.js` code, same `TB_Admin` nonce/ajax_url pattern as the existing edit-booking modal).
  • Upcoming-bookings table on the Reminders tab now shows "X of Y steps sent" (from `tb_notification_sent`) plus an "Own setup" badge when a booking has an override, instead of the old single sent/not-sent date. The reminder log table gained a "Step" column (`Before 26h` / `After 24h` etc.) alongside the existing Test/Auto badge.
  • Test-send button (existing, from v1.72.63) is unchanged — still sends all currently-effective enabled steps for the chosen booking.
  • Not tested in a real WordPress installation yet.
v1.72.63 August 2026
▼
  • **New: flexible multi-step notification system for bookings — Phase 1 of 3 (data model + engine, no UI changes yet).** Replaces the previous hardcoded "single reminder, 26 hours before" behavior. See `handover-tb-booking.md` for full design rationale.
  • New tables: `tb_notification_rules` (global default steps — can now hold multiple steps, e.g. 48h and 2h before), `tb_booking_notification_rules` (per-booking override — if any row exists for a booking, it **fully replaces** the global rules for that booking, no merging), `tb_notification_sent` (tracks which rule has been sent for which booking — replaces the old single `tb_bookings.reminder_sent_at` flag, which could only represent one step). `tb_reminder_log` extended idempotently with `notification_type`/`offset_hours` for the audit trail.
  • Each rule has a `type`: `before` (X hours before `start_time`, the existing reminder concept, now configurable instead of hardcoded) or **`after`** (new — X hours after `end_time`, for a post-visit thank-you/satisfaction message).
  • Each rule supports `message_mode`: `standard` (built-in default text) or `custom` (admin-provided override text, per step). New `TB_Email_Reminder::send_after_visit()` / `TB_Email::send_after_visit()` for the after-visit template.
  • **One-time seed migration** on upgrade: existing `tb_settings['reminder_enabled']`/`['reminder_intro']` are migrated into a single global rule (`before`, 26h) so existing installations keep working identically after upgrading — no coverage gap.
  • `class-tb-reminder.php` cron loop (`run_hourly_check()`) rewritten to iterate active rules (global, excluding bookings with an override; then booking-specific) instead of one fixed SQL window.
  • `tb_bookings.reminder_sent_at` column is **kept** in the database (no data-loss risk) but is no longer written to by the new logic — see known UI limitation below.
  • ⚠️ **Known Phase-1 limitation, by design:** `admin/bookings/page-reminders.php` (Settings panel, and the "Reminder sent" column in the test-send table) is **not yet updated** — it still reads the old single settings/`reminder_sent_at` and will look inaccurate (e.g. "not sent" even after a real send) until Phase 2 rebuilds that UI around the new rule model. The test-send button itself **is** rule-aware already: it sends all currently-effective steps (booking override if present, else all enabled global steps) for the chosen booking.
  • Not tested in a real WordPress installation yet.
v1.72.62 August 2026
▼
  • **New: duplicate-registration guard.** `TB_Event::do_register()` (shared by single and series signups) now rejects a signup if the submitted email already has an active (registered or waitlisted) registration for that event/date — checked case-insensitively, and checked for **every** date in a series before creating any rows (atomic: no partial signup if a duplicate is found on a later date). A previously **cancelled** registration does not block re-registering — someone who cancelled can sign up again freely. Surfaces as a normal validation error ("This email address is already registered for this event...") through the existing `WP_Error` → `wp_send_json_error()` path, no AJAX handler changes needed.
  • **New: venue website/map link for physical events.** New optional `venue_url` field next to the existing address field in the event admin form (physical events only) — new `tb_events.venue_url` column (idempotent `ALTER`). Shown as a "See map/venue" link next to the address on `[tb_events]` and in the registration confirmation email.
  • Not tested in a real WordPress installation yet.
v1.72.61 August 2026
▼
  • **New (Phase 7 of the Events module — completes the originally planned scope): broadcast a message to registered/waitlisted/cancelled participants.** See `handover-tb-events.md` for full scope and phase history.
  • New "Send message to participants" toggle on the participant list — a form with recipient checkboxes (Registered/Waitlist/Cancelled, defaulting to Registered+Waitlist checked), a subject line, and a message body.
  • Sends as an **individual email per recipient** (not one combined BCC) — matches the pattern already used for every other event email (confirmation, cancellation, waitlist promotion). New `TB_Email_Events::send_broadcast_message()` (+ `TB_Email` facade delegate) wraps the admin's message in the same visual template as the other event emails, with the event title/date shown for context.
  • New `TB_Admin_Events::send_broadcast()` (`admin_post_tb_send_event_broadcast`) — reuses the existing `TB_Event::get_registrations( $event_id, ['status' => ...] )` per selected group, so no new model method was needed (kept `class-tb-event.php` from growing further — see file-size note below).
  • **Deliberately scoped per-event/per-date**, matching the participant list's existing scope from Phase 4 — a note in the form explains that a series' broadcast has to be sent separately per date if it should reach everyone (no auto-fan-out across a series' shared `cancel_token` in this phase).
  • ⚠️ `admin/class-tb-admin-events.php` is now **703 lines** — well past the 600-line warning threshold. This was the last planned phase for the Events module's original scope; **recommend a dedicated split session before further feature work on this file** (e.g. extract participant-list/export/broadcast into a companion `class-tb-admin-events-participants.php`, following the router+domain-class pattern already used elsewhere — courses, therapist-portal AJAX, etc.).
  • This completes Phases 1–7 of the originally planned Events module scope (DB/model/admin CRUD → series-by-dates → frontend signup/cancellation → participant list/export → payment → Zoom/Teams → broadcast messaging). Remaining known gaps, none newly introduced this session: waitlist-promoted paid registrations don't get an automatic new payment prompt (v1.72.58); a series' capacity/payment-method/extra-fields settings are only reliably in sync across dates if never edited individually per-date after series creation (v1.72.55/59).
  • Not tested in a real WordPress installation yet.
v1.72.60 August 2026
▼
  • **New (Phase 6 of the Events module): automatic Zoom/Teams meeting creation for online events.** See `handover-tb-events.md` for full scope.
  • **Critical discovery made before writing any event-facing code:** both `TB_Zoom::create_meeting()` and `TB_Teams::create_meeting()` do a hardcoded `$wpdb->update()` on `tb_bookings` keyed by `$booking->id`. Reusing either method with a "pseudo-booking" object carrying an *event* ID would have silently overwritten a same-numbered booking's Zoom/Teams data in a completely unrelated table (`tb_events` and `tb_bookings` each have their own independent auto-increment counter, so ID collisions are routine, not rare). **Not shipped this way.**
  • Fix/prevention: extracted the pure Zoom/Teams API-calling logic into new `TB_Zoom::create_meeting_raw()` / `TB_Teams::create_meeting_raw()` — verified byte-for-byte behavior-preserving pure extraction (`create_meeting()` itself now just builds its booking-specific topic/agenda and delegates to the raw method, then does the exact same `tb_bookings` write as before). The raw methods have **zero database side effects**; callers own persistence. This is a refactor of TB Kalender-domain files done from within this Events session — flagged here and in `handover-tb-kalender.md` per the cross-component rule, but `create_meeting()`'s public behavior for existing bookings is unchanged (confirmed via brace-balance checks and a full read-through of both before/after versions).
  • New `TB_Event::maybe_create_online_meeting( $event_id )` — called automatically from `save()` whenever an online event is saved with `status = 'published'` and no meeting URL yet (idempotent: won't recreate on subsequent saves). For a series, each date gets its own independent meeting, consistent with how series occurrences are already treated everywhere else in this module.
  • **Zoom**: uses the clinic's existing global Zoom account (same credentials as the booking flow) — no per-event configuration needed beyond selecting "Zoom" as the provider.
  • **Teams**: fundamentally tied to a specific therapist's Microsoft 365 connection (unlike Zoom, there's no clinic-wide Teams identity in this codebase) — new "Host (Microsoft 365 therapist)" dropdown in the event admin form, shown only when Teams is selected, listing all therapists and flagging which ones aren't MS-connected. New `host_therapist_id` column on `tb_events` (idempotent `ALTER`).
  • The event admin form now shows the created meeting link (or an error hint) once available; the registration confirmation email now includes an actual "Join the meeting" link for online events instead of just the word "Online" — the link is only ever sent to confirmed registrants via email, never shown on the public `[tb_events]` listing itself.
  • ⚠️ `includes/class-tb-event.php` is now **775 lines** — approaching the 1,000-line mandatory-split threshold. Strongly recommend splitting before Phase 7 (registration/payment methods into a companion file, as already flagged in v1.72.58's changelog entry).
  • Not yet built: the "broadcast a message to registered/cancelled participants" feature (Phase 7).
  • Not tested in a real WordPress installation yet — in particular, the Zoom/Teams extraction refactor and the new automatic meeting creation should both be verified end-to-end (including that existing booking Zoom/Teams flows are still completely unaffected) before relying on this in production.
v1.72.59 August 2026
▼
  • **New: per-event payment method selection.** The event admin form now shows three checkboxes (MobilePay / Stripe / Pay on arrival) whenever price > 0 (JS-toggled on the price field, same "hidden fields don't block submit" pattern established in v1.72.52 — but this time not an issue since none of these checkboxes are `required`). New `allowed_payment_methods` column on `tb_events` (idempotent `ALTER`), new `TB_Event::get_allowed_payment_methods()`/`get_valid_payment_methods()`. Empty/missing selection falls back to all three — both for backward compatibility (events created before this version) and as a safety net against a priced event ending up with zero payment options.
  • `[tb_events]` now only renders the payment-method radio buttons the admin actually checked for that event (Stripe is additionally hidden if not configured, same as before). `TB_Event_Ajax::register()` independently re-validates the submitted `payment_method` server-side against the event's own allowed list — a manipulated POST can't bypass the admin's checkbox choice.
  • **New: live/test mode toggle for MobilePay and Stripe in Settings → Payment**, matching the toggle already built in BBB Sales/tb-saas. Each gateway now has a "Mode: Live/Test" radio plus two full credential sets (existing field names become the permanent "Live" slot — zero migration, no existing production credentials touched; new `_test`-suffixed fields hold the test/sandbox credentials). Both sets can be saved simultaneously, so switching between test and live no longer means overwriting and re-entering keys.
  • `TB_MobilePay`/`TB_Stripe` internals refactored around new `mode()`/`creds()` (MobilePay) and `mode()`/`secret_key()`/`webhook_secret()` (Stripe) helpers — every direct settings-array read for these keys (token fetch, payment creation, capture, cancel, status lookup, webhook signature check) now goes through one central mode-aware lookup instead of six separate duplicated reads.
  • MobilePay's old `mobilepay_sandbox` checkbox is removed from the settings UI (superseded by `mobilepay_mode`), but `TB_MobilePay::mode()` still reads it as a fallback when `mobilepay_mode` isn't saved yet, so existing installations behave identically until the admin next visits and saves the Payment tab.
  • Not tested in a real WordPress installation yet — test mode toggling and the payment-method checkboxes should both be verified end-to-end (including that "Test API connection"/"Test Stripe connection" correctly test whichever mode is currently saved) before relying on them in production.
v1.72.58 August 2026
▼
  • **Correction to the v1.72.57 changelog entry:** the "mono theme CSS gap" flagged there was a false finding — retracted after Søren tested every theme directly on the booking portal and confirmed they all render correctly. Root cause of my mistake: `admin/settings/tab-design.php`'s theme-picker JS fills in every individual color field with the selected theme's concrete hex values before the form is submitted, so the saved `tb_booking_design` option always holds real colors — `TB_Design_CSS::inject()`'s own (incomplete) local theme list is never actually relied on for mono themes in practice. Not repeating this claim going forward.
  • **New (Phase 5 of the Events module): payment for priced events — Stripe + MobilePay.** See `handover-tb-events.md` for full scope.
  • Registering for a priced event (not on the waitlist) now offers a payment method choice — MobilePay, Stripe (only shown if configured), or "Pay on arrival" (no online payment; confirms immediately, payment handled in person, same convenience pattern as booking's `pay_at_clinic`) — and redirects the browser to the chosen gateway's checkout page. Waitlisted signups are never charged (no confirmed spot yet); this is a known, accepted limitation until a "waitlist promoted to a paid spot" payment-prompt flow is built in a future phase.
  • Same order-id-prefix convention as gift cards (`GC-`)/courses (`CR-`): `EV-{registration_id}-{timestamp}`. A series signup's single price (the series' representative occurrence's price — not summed across dates, matching how capacity/waitlist already work) is charged once, and the same `payment_order_id` is written to **every** registration row sharing that signup's `cancel_token`, so payment confirmation activates the whole series at once.
  • New `TB_Event::set_payment_order()`, `set_payment_status_by_token()`, `get_registrations_by_order_id()`, `activate_payment_by_order()` — mirrors `TB_GiftCard::activate()`/`TB_Course::activate()`.
  • `TB_MobilePay::maybe_update_gc_or_course()` (webhook dispatcher) and `TB_Stripe::maybe_update_gc_or_course()` (webhook + return-handler dispatcher) both extended with an `EV-` branch: on confirmed payment, marks the registration(s) paid and sends the real registration-confirmation email (no longer the "payment pending, clinic will follow up" placeholder text from Phase 3/4 — that placeholder is gone now that real payment is wired up).
  • `TB_MobilePay::lookup_capture_context()` extended with an `EV-` branch (capture amount comes from the event's price, looked up via the registration's `event_id` join) — needed for the existing immediate-capture flow in `TB_Ajax_Payment::handle_payment_return()` to work for events the same way it already does for bookings/gift cards/courses.
  • No changes needed to `TB_Ajax_Payment::handle_payment_return()`/`TB_Stripe::handle_return()` themselves — both already had generic (non-booking) branches driven entirely by `lookup_capture_context()`/`maybe_update_gc_or_course()`, which is precisely why extending those two dispatch points was sufficient.
  • ⚠️ `includes/class-tb-event.php` is now **654 lines** — over the 600-line warning threshold (not yet at the 1,000-line mandatory-split point, but getting closer with each phase; worth planning a split — e.g. registration/payment methods into a companion `class-tb-event-registration.php` — before Phase 6 or 7 adds more).
  • Not yet built: actual Zoom/Teams meeting link creation (Phase 6), and the "broadcast a message to registered/cancelled participants" feature (Phase 7).
  • Not tested in a real WordPress installation yet — in particular, real payment flows should be tested in MobilePay/Stripe **test mode** first, same as any other payment-touching change.
v1.72.57 August 2026
▼
  • **New: Events "Design" tab** — pick from the same 7 color themes as the booking portal (Dark, Light, Neutral, Modern Dark, Modern Light, Mono Dark, Mono Light) for the public `[tb_events]` shortcode. New tab alongside the events list (`admin.php?page=tb-events&tab=design`), stored in a new `tb_events_design` option, defaulting to `modern_light` (preserves the shortcode's existing light-card look for sites that don't touch the new setting).
  • New `TB_Design_CSS::get_theme_presets()` — the 7 theme color definitions, extracted as a shared static method so they don't need duplicating for this new consumer. Deliberately does **not** touch `admin/settings/tab-design.php`'s own local copy or `TB_Design_CSS::inject()` (zero risk to the already-working booking-portal design feature).
  • **Discovered, not fixed (flagging for a future TB Admin UI/Design session):** ~~`TB_Design_CSS::inject()`'s own theme list is missing `mono_dark`/`mono_light`...~~ **Corrected (Søren, after testing every theme directly on the booking portal):** this was NOT an actual bug. `admin/settings/tab-design.php`'s theme-picker JS fills in every individual color field (`tb_d_bg`, `tb_d_accent`, etc.) with the selected theme's concrete hex values BEFORE the form is saved — the saved overrides in `tb_booking_design` are therefore always concrete colors, regardless of whether `inject()`'s own local theme list contains the theme key or not. `inject()`'s incomplete list is only ever used as a fallback for empty fields, which never happens in practice. This claim must NOT be repeated going forward (per PROJEKT_KONTEKST.md's rule against re-asserting disproven findings).
  • `[tb_events]`'s cards, buttons, and form fields now read the selected theme via CSS custom properties (`--tb-ev-bg`, `--tb-ev-card-bg`, `--tb-ev-text`, `--tb-ev-accent`, etc.) instead of hardcoded colors, including the JS success/error message colors.
  • **New: "Export to Excel" on the participant list** — CSV download (UTF-8 BOM + semicolon delimiter, same convention as the existing accounting export in `TB_Accounting::export_csv()`, so it opens correctly in Excel with Danish characters/decimals without extra import steps). Columns: name, phone, email, comment, one column per the event's configured extra field (checkbox values as Yes/No), status, payment status, signup timestamp. Respects the currently active status filter (All/Registered/Waitlist/Cancelled) — exporting from the "Waitlist" tab exports only the waitlist, etc.
  • New `TB_Event::export_participants_csv()` (model) + `TB_Admin_Events::ajax_export_participants()` (`wp_ajax_tb_export_event_participants`, same `tb_admin_nonce` action/pattern as the accounting export — no JS needed, the link carries its own nonce).
  • ⚠️ `admin/class-tb-admin-events.php` is now **605 lines** — just over the 600-line warning threshold (not yet at the 1,000-line mandatory-split point). Flagging per house rule; consider extracting the participant-list/export/design methods into a companion file before the next feature is added here.
  • Not tested in a real WordPress installation yet.
v1.72.56 August 2026
▼
  • **New (Phase 4 of the Events module): admin participant list.** See `handover-tb-events.md` for full scope.
  • New "Participants (N)" button on each row of the Events admin list, opening a per-event participant list: name, phone, email, comment, extra registration fields (rendered as label/value using the event's own field config, checkbox values shown as Yes/No), status, payment status, and signup timestamp.
  • Status filter tabs (All / Registered / Waitlist / Cancelled), counts taken from the existing `TB_Event::get_registration_counts()`.
  • A participant who signed up for a multi-day series shows "Registered for X days in the series" under their name (new `TB_Event::get_series_signup_dates_count()`, counts non-cancelled rows sharing the same `cancel_token`).
  • New "Cancel" action per participant, routed through the **same** `TB_Event::cancel_registration_by_token()` used by the public self-service cancellation page — so cancelling a series participant from any one date's admin list cancels their spot on every date at once, triggers the same waitlist-promotion logic, and sends the same cancellation/promotion emails as a self-service cancellation would.
  • Deliberately scoped per-event/per-date for this phase (matches how the admin event list already manages series occurrences as separate rows) — a note on the participant list points to the fact that other dates in the same series have their own separate participant list.
  • Not yet built: payment (Phase 5), actual Zoom/Teams meeting link creation (Phase 6), and the "broadcast a message to registered/cancelled participants" feature (Phase 7).
  • Not tested in a real WordPress installation yet.
v1.72.55 August 2026
▼
  • **Changed: multi-day event series now appear as ONE card on `[tb_events]`, not one card per date** — requested by Søren after testing Phase 3. A participant now signs up once for the whole series instead of separately per date.
  • New `TB_Event::get_grouped()` — groups `get_all()`'s flat result by `series_id` for display purposes; standalone events pass through unchanged.
  • `[tb_events]` now renders a single card per series: the series title, a bullet list of every date/time, and one "Sign up for the whole series" button/form. Price, capacity, waitlist setting, and extra-fields config are taken from the series' first (soonest) occurrence, since all occurrences share these by default when created via the admin UI's date-list series builder.
  • **Registration/model rework:** `TB_Event::register_participant()` (single) and the new `register_participant_series()` now share one internal `do_register()` implementation. A series signup creates one registration row **per date** (so admin's future per-date participant list still works, and each date keeps its own capacity count), but all rows from the same signup **share one `cancel_token`** — so a single cancellation link cancels attendance for every date in the series at once. Capacity/waitlist for a series is evaluated from its first occurrence, on the assumption all dates share the same `max_participants`/waitlist setting (true for series created normally; noted as a known limitation if dates are later edited individually to diverge).
  • `tb_event_registrations.cancel_token` changed from a `UNIQUE` key to a regular (non-unique) index, since series signups now intentionally reuse the same token across multiple rows. Existing installs (Søren's test site) get this via an idempotent `ALTER ... DROP INDEX` / `ADD KEY`, checked via `SHOW INDEX` so it only runs once.
  • `TB_Event::get_registration_by_token()`/`cancel_registration_by_token()` (singular) replaced with `get_registrations_by_token()`/`cancel_registration_by_token()` returning arrays — a single-event signup is simply the 1-row case, so no special-casing is needed anywhere downstream. Updated the only caller (`TB_Event_Ajax`, this same phase, not yet relied on elsewhere) accordingly.
  • `TB_Email_Events::send_registration_confirmation()`/`send_cancellation()` reworked to take the unified multi-event shape and render either one date or a full date list; subject lines and copy adapt automatically ("whole series" wording) when there's more than one date.
  • The standalone cancellation page (`?tb_action=event_cancel`) now lists every date in the series in its confirmation summary, and its "already cancelled"/success messages adapt to series vs. single wording.
  • `tb_event_register` AJAX action now takes `reg_type` (`single`|`series`) + `target_id` instead of always `event_id`, decided by which button the visitor clicked on the shortcode.
  • No change to the admin event list/edit screens in this pass — they still show each series occurrence as its own row with a "Part of series" tag, which remains useful for per-date admin editing; only the **public-facing** `[tb_events]` display and signup flow changed.
v1.72.54 August 2026
▼
  • **Fixed: a published event with "Show on website" checked did not appear in `[tb_events]`** — reported by Søren. Root cause: `TB_Event::get_all()`'s `upcoming_only` filter compared `start_datetime` against `current_time('mysql')`, which uses **WordPress' own site timezone setting**. The rest of the plugin (booking availability, etc.) instead uses the plugin's own configurable timezone (`tb_get_timezone()` / `tb_settings['timezone']`, which falls back to WP's timezone only if unset). If those two differ — e.g. a test install left on the WordPress default of UTC while the plugin is configured for Europe/Copenhagen — a genuinely upcoming event could be wrongly judged as already past and filtered out.
  • Fix: `upcoming_only` now computes "now" via `tb_get_timezone()`, matching how the rest of the plugin reasons about the current local time.
  • No change to how event date/times are stored (still naive local wall-clock strings, unchanged since Phase 1).
v1.72.53 August 2026
▼
  • **New (Phase 3 of the Events module): `[tb_events]` frontend shortcode + signup/cancellation.** See `handover-tb-events.md` for full scope.
  • New `[tb_events]` shortcode (`includes/class-tb-event-shortcode.php`) — lists upcoming, published, show-on-website events as cards (title, date/time, location or "Online", price, spots left / waitlist count). Each card has an inline "Sign up" form (name/phone/email/comment + the event's own configured extra fields), submitted via a small self-contained AJAX script embedded in the shortcode output (does not touch `booking.js`, which is already over the 1,000-line threshold).
  • New `TB_Event::register_participant()`, `cancel_registration_by_token()`, `get_registration_by_token()`, `get_registrations()` — capacity/waitlist logic: registers directly if there's room, otherwise waitlists if enabled (else rejects), and automatically promotes the oldest waitlisted registration when a registered participant cancels.
  • New `includes/class-tb-event-ajax.php` — `tb_event_register` AJAX handler (validates required/extra fields against the event's own config) and a standalone cancellation page at `?tb_action=event_cancel&token=...` (same GET-view/POST-confirm pattern, and the same dark-themed template, as the existing booking cancellation page).
  • New `includes/class-tb-email-events.php` (+ thin `TB_Email` facade delegates) — registration confirmation (or waitlist notice), cancellation confirmation, and "you've been promoted from the waitlist" emails. Each registration gets its own random 64-char `cancel_token` (new column on `tb_event_registrations`, added via an explicit idempotent `ALTER` since dbDelta's handling of `UNIQUE KEY` additions on an existing table is less predictable than plain column additions).
  • **Payment for priced events is intentionally NOT wired up yet (still Phase 5).** A priced event can be registered for right now — the registration is created with `payment_status = 'pending'`, the confirmation email says the clinic will follow up on payment manually, and nothing blocks the signup. This lets the whole capacity/waitlist/extra-fields/cancellation flow be tested end-to-end today without waiting for Stripe/MobilePay to be hooked in.
  • New neutral hooks (no listeners = no effect on standalone installs): `tb_event_registration_insert`, `tb_event_registration_created`, `tb_event_registration_cancelled`.
  • Not yet built: the admin participant list (Phase 4), payment (Phase 5), actual Zoom/Teams meeting link creation (Phase 6), and the "broadcast a message to registered/cancelled participants" feature (Phase 7).
  • Not tested in a real WordPress installation yet.
v1.72.52 August 2026
▼
  • **Fixed: "Save" button silently did nothing in "Recurring series" mode** — reported by Søren after testing v1.72.51. Root cause: `tbEvToggleRecurrence()` only hid the single-event Start/End `<tr>` rows via `display:none`, but their ``s kept the `required` attribute. A hidden-but-required field still fails HTML5 constraint validation on submit, and since the field can't be focused (it's not rendered), the browser silently aborts the submission without showing any error bubble — indistinguishable from the button doing nothing. Switching back to "Standalone event" worked as expected because there the same fields are visible and reportable.
  • Fix: `tbEvToggleRecurrence()` now also toggles the `required` IDL property (not just visibility) on the Start/End inputs — `false` when hidden in series mode, `true` when shown in single mode.
v1.72.51 August 2026
▼
  • **Changed: Events series creation now uses explicitly picked dates instead of a fixed recurrence rule.** A rule like "weekly for N occurrences" can't express "4 consecutive days" or "a Monday one week and a Wednesday the next" — reported by Søren after Phase 1 testing. The admin form's "Recurring series" mode now shows a shared start/end time-of-day plus a repeatable list of native date pickers (browser's own calendar widget per date, "+ Add date" to add more), instead of a recurrence-type dropdown + occurrence count.
  • New `TB_Event::generate_series_from_dates( $series_id, $dates, $template )` — builds one event per explicitly chosen date at the shared time-of-day. The old rule-based `generate_series_events()` is kept, unused but unremoved (per house rule against blind deletion), for potential future reuse.
  • `tb_event_series.recurrence_type` ENUM extended with a `'custom'` value (now the default) to represent date-list-based series. Existing sites get this via an explicit idempotent `ALTER ... MODIFY COLUMN` (same pattern as `delivery_type`/`calendar_type`) since `dbDelta()` doesn't reliably widen ENUMs on an already-existing table — not just the `dbDelta()` CREATE TABLE definition, which only applies to fresh installs.
  • Series creation now requires at least one date; submitting none redirects back to the form with a "Choose at least one date for the series" notice instead of silently creating an empty series.
  • No change to single-event creation/editing, or to the previously-tested extra-fields builder.
v1.72.50 August 2026
▼
  • **Fixed: Events admin page incorrectly showed "Events requires the Clinic plan"** — copy-pasted from the Giftcards/Courses `locked_notice()` pattern without considering that Events should be included in every license plan (Solo/Clinic/Pro), not gated to a specific tier. Removed the plan-lock notice entirely; the page now renders unconditionally regardless of license status. No License Server change needed — the `'events'` feature key was never configured there, so this was purely a client-side admin-page restriction.
v1.72.49 August 2026
▼
  • **New (Phase 1 of the Events module): database schema, `TB_Event` model, and admin CRUD for clinic events** — lectures/workshops/courses held by the clinic, separate from the therapist-based booking flow. See `handover-tb-events.md` for full scope and remaining phases.
  • New tables: `tb_event_series` (recurrence templates), `tb_events` (individual event occurrences — physical or online, price, capacity, waitlist flag, configurable extra registration fields as JSON, status), `tb_event_registrations` (schema only in this version — not yet written to; participant signup ships in a later phase).
  • New `includes/class-tb-event.php` — CRUD for events and series, series generation (`generate_series_events()`, weekly/biweekly/monthly), extra-field encode/decode, registration-count/capacity helpers.
  • New `admin/class-tb-admin-events.php` — new "Events" admin menu (list + create/edit). Create/edit supports: single event or recurring series (first occurrence's date/time is used as the series anchor; each generated occurrence can subsequently be edited/cancelled individually), physical/online (Zoom/Teams selector — meeting creation itself not yet wired up), price (0 = free), max participants (blank = unlimited) with optional waitlist, a repeatable "extra registration fields" builder (label/type/required, saved as JSON on the event), status (draft/published/cancelled), and a `[tb_events]` show-on-website toggle (shortcode not yet built).
  • Gated behind `TB_License::has_feature('events')`, same non-blocking `locked_notice()` pattern as Giftcards/Courses — no License Server changes required, this reuses the existing generic feature-flag mechanism.
  • Neutral hooks added for future SaaS Shell scoping (no listeners = no effect on standalone installations): `tb_events_where`, `tb_event_insert`, `tb_event_created`.
  • **Not yet built (see handover-tb-events.md for the full remaining plan):** `[tb_events]` frontend shortcode, participant signup/cancellation (AJAX), the admin participant list, payment (Stripe + MobilePay, same order-id-prefix pattern as gift cards/courses), actual Zoom/Teams meeting creation, and the "send a message to registered/cancelled participants" broadcast feature.
  • Not tested in a real WordPress installation yet.
v1.72.48 August 2026
▼
  • **Refactor: reduced `therapist-booking.php` from 892 to 581 lines (no functional change) — proactive split before the file reached the 1,000-line mandatory-split threshold.**
  • Extracted `tb_inject_design_css()` (137 lines) into a new `TB_Design_CSS` class (`includes/class-tb-design-css.php`). Registered via `array('TB_Design_CSS','inject')` on the same `wp_head`/`admin_head` hooks as before.
  • Extracted the 6 Google Calendar AJAX wrapper functions (`tb_google_disconnect`, `get_calendars`, `set_calendar`, `test_slots`, `get_log`, `clear_log`) into a new `TB_Google_Ajax` class (`includes/class-tb-google-ajax.php`). No change to the underlying `TB_GoogleCalendar` integration.
  • Extracted the 6 equivalent Microsoft 365 AJAX wrapper functions into a new `TB_MS_Ajax` class (`includes/class-tb-ms-ajax.php`). No change to the underlying `TB_MicrosoftCalendar` integration.
  • **Minor consistency fix as part of the same move:** `tb_ms_get_calendars`/`tb_ms_set_calendar` had their `add_action()` registrations sitting outside `tb_init()` (directly after their function definitions) — an existing inconsistency versus the other 10 AJAX handlers, which register inside `tb_init()`. All 12 are now registered uniformly inside `tb_init()`. No functional change: these hooks only ever fire on an actual AJAX request, long after `plugins_loaded`/`tb_init()` has already run.
  • Not touched: timezone helpers (`tb_get_timezone`, `tb_local_to_timestamp`, `tb_format_time`), PWA service worker/manifest endpoints, `tb_license_ajax_handler()`, `tb_maybe_create_online_meeting()`, and the Microsoft OAuth login/redirect handlers — all remain in the main file unchanged.
  • Verified: brace count balances (62/62), no dangling references to the old global function names anywhere in the codebase.
v1.72.47 August 2026
▼
  • **Fixed: several strings in the therapist portal's "Services" self-service tab were never translated to English** — reported by Søren via screenshot showing untranslated Danish text at the bottom of the services list on both `/tpadmin/` and standalone installations.
  • **Root cause:** the Services self-service tab (`sections/section-services.php`, built in v1.72.22–32) uses `esc_html_e()`/`esc_html__()` correctly with the `therapist-booking` text domain, but 12 of its strings were never added to the translation catalog (`languages/therapist-booking.pot` / `therapist-booking-en_US.po`/`.mo`) — the catalog was apparently not regenerated after that feature shipped. Older strings in the same file (Duration, Price, Color, etc.) were already translated correctly.
  • Fix: added the 12 missing `msgid`/`msgstr` pairs to the English (US) translation and to the `.pot` template, then recompiled `therapist-booking-en_US.mo`. No PHP code changes — the rendering code was already correct.
  • Affected strings included the bottom-of-list description text, "+ Create new service", "Hidden by the clinic", duration/notice/prep/cleanup time field labels, and the deposit helper text.
v1.72.46 August 2026
▼
  • **Fixed: naked portal page (v1.72.45) rendered non-mobile-friendly — no viewport meta tag.** `render_shortcode()`'s own viewport `` tag is added via `add_action('wp_head', ...)`, but in the naked shell `wp_head()` fires *before* `do_shortcode()` runs — so the tag was registered too late and never actually output. Previously masked by the host theme's own boilerplate viewport tag in `header.php`; with the theme's header removed entirely, nothing was left to set it, so mobile browsers fell back to rendering at desktop width (~980px) and zooming out.
  • Fix: `maybe_serve_naked()` now writes its own explicit `` directly in the shell's ``, before `wp_head()` — independent of the shortcode's own (still-unfixed, but now irrelevant for this path) late hook registration.
  • Not yet tested on a real device.
v1.72.45 August 2026
▼
  • **New: optional "naked" rendering of the therapist portal page** — fixes the portal looking cramped/messy on standalone installations whose theme wraps the `[therapist_portal]` shortcode in its own header/footer/sidebar, letting the host theme's typography and table CSS bleed into the portal's own design (same class of bug as the wp-admin `.form-table th` collision fixed in v1.72.44, except the culprit here is the customer's own theme instead of WP core).
  • New setting, Settings → General → "Therapist portal display": "Show the therapist portal without the theme's header/footer" (checkbox, saved as `tb_settings['portal_naked_page']`). **Default: off** — does not change behavior on any existing site unless explicitly enabled.
  • When enabled, `TB_Therapist_Portal::maybe_serve_naked()` (hooked on `template_redirect`, i.e. before the theme's template file loads) detects requests to the configured portal page and outputs a minimal HTML shell (`wp_head()`/`wp_body_open()`/shortcode output/`wp_footer()`) instead of letting the theme's `header.php`/`footer.php` render, then exits. Background color is pulled from the selected portal design theme (`tb_booking_design`) to avoid a white flash outside `.portal-wrap` before `tb_inject_design_css()` (hooked on `wp_head`) applies.
  • Not yet tested on a real standalone installation with a third-party theme.
v1.72.44 August 2026
▼
  • **Fixed for real this time: wp-admin's "Create booking manually" calendar rendering only one narrow column instead of a 7-day grid** (v1.72.43's compactness fix didn't address the actual cause — Søren's follow-up screenshot showed it was worse, not better).
  • **Actual root cause found:** the calendar's `<table>` was nested inside `<table class="form-table">` (used to lay out the rest of the modal's fields). WordPress core's own admin CSS rule `.form-table th { width: 200px; ... }` is a plain descendant selector — it applies to **every** `<th>` nested anywhere under a `.form-table`, regardless of nesting depth, not just the form-table's own direct label cells. That forced all 7 of the calendar's weekday `<th>` header cells to 200px each, blowing the table out to ~1400px and leaving only the first column visible without horizontal scrolling. The existing, working blocked-dates calendar on the therapist edit page was never affected by this because it was deliberately built as a **standalone `<div>`, outside any `.form-table`** — not because of anything special in its CSS.
  • Fix, following Søren's request to use "the same method/view" as that working calendar:
  • Not yet tested in a real WordPress installation — please confirm all 7 columns render correctly and available days are clickable.
v1.72.43 August 2026
▼
  • **Fixed: wp-admin's "Create booking manually" availability calendar stretched out too wide** (Søren reported it overflowing/dominating the modal on a narrow viewport, with columns cut off requiring horizontal scroll). Root cause: `#cb-cal-wrap`'s containing `<td>` had no explicit width (unlike its sibling rows, which all set `style="width:100%"` on their input/select), and the widget itself had no `max-width`/`box-sizing:border-box`, so it could grow past its intended bounds under `table-layout:auto` (the WordPress admin `.form-table` default).
  • Fix: `<td style="width:100%">` on the calendar row (matches sibling rows' convention) + `box-sizing:border-box` added throughout the widget + explicit `max-width:280px` on `#cb-cal-wrap` so it renders as a compact, contained date-picker rather than stretching the full modal width.
  • Also made cells noticeably more compact per Søren's request ("takes up too much space"): day-cell height 32px → 24px, font sizes reduced (title 13px→12px, weekday headers 10px→9px, day numbers 13px→11px, status line 11px→10px), tighter padding throughout.
  • Portal calendar (`portal-app.php`) not touched — Søren confirmed it already renders fine; only the wp-admin one needed this.
  • **Separate, flagged but not addressed here:** Søren also reported the tb-saas SaaS Shell's own "Add booking" calendar (clinic portal, `[tbs_portal]` → Bookings tab) loads but never marks any days as available. This is tb-saas' own separate implementation — not present in this session's working files (only `therapist-booking` was uploaded). Needs the tb-saas ZIP uploaded in a SaaS Shell session to diagnose; not investigated or touched here.
v1.72.42 August 2026
▼
  • **New: availability calendar in the manual booking-creation modals (both wp-admin "Create booking manually" and the therapist portal's "Create booking"), replacing the plain ``.** The calendar marks which days actually have at least one open slot for the selected therapist/service — the exact same data source (`TB_Therapist::get_available_dates_in_month()`) the public booking form already uses, so staff see precisely what a client would see instead of guessing a date and hoping it's free.
  • **New shared helper `TB_Therapist::get_available_dates_in_month( $therapist_id, $service_id, $year, $month )`** — extracted from `TB_Ajax_Booking::get_available_dates()` so the day-loop/blocked-dates logic isn't duplicated across the public, wp-admin, and portal call sites. `TB_Ajax_Booking::get_available_dates()` now just calls the shared helper (no behavior change, still public/nopriv, still no nonce — read-only data).
  • **New AJAX endpoints:**
  • **wp-admin calendar** (`admin/bookings/page-list.php` + new code in `admin/admin-bookings.js`): activates once a therapist is selected, refetches on month navigation and on service change (duration affects which slots — and therefore days — are available). Light theme to match the white modal. New CSS in `admin.css` (`.cb-cal-*`).
  • **Portal calendar** (`includes/therapist-portal/portal-dashboard.php` + new code in `includes/therapist-portal/portal-app.php`): same behavior, dark/branded theme matching the portal's existing CSS custom properties (consistent with the existing blocked-dates calendar's visual language). Online-only blocked days get the same teal treatment as elsewhere.
  • Both calendars mark available days clicking sets the (now hidden) date field and fires the existing 'change' handling, so the rest of the create-booking flow (slot loading, submit) is untouched.
  • **Bonus fix, same bug as v1.72.40 but in wp-admin:** `ajax_admin_create_booking()` also hardcoded `delivery_type => 'physical'`, so manually creating an online booking from wp-admin never created a Zoom/Teams meeting either. Now derives it from the selected service, same fix as the portal got last version.
  • New translatable string `"Fetching available days..."` added to the language catalog (`.po`/`.pot`) with English translation "Fetching available days...". `.mo` recompiled (1,201 records, +1, verified).
  • ⚠️ **File-size note:** `includes/therapist-portal/portal-app.php` grew from 1,025 → 1,140 lines with this feature — already over the 1,000-line mandatory-split threshold before this change (split previously deferred by agreement), and now further over it. Not split in this session; flagged clearly for the next TB Admin UI/Booking Flow session. `admin/admin-bookings.js` (the new file from this session's earlier split) is at 462 lines — comfortably under the threshold even after adding the calendar.
  • ⚠️ Crosses into TB Booking Flow chat's territory (`class-tb-ajax-booking.php`, portal booking files already shared with that chat from v1.72.40's work). Flagged in both `handover-tb-admin.md` and `handover-tb-booking.md`.
  • Not yet tested in a real WordPress installation.
v1.72.41 August 2026
▼
  • **File split: `admin/admin.js` (1,209 lines, over the mandatory 1,000-line split threshold) → `admin.js` (886 lines) + new `admin/admin-bookings.js` (351 lines).** Pure structural move, no behavior changes — done ahead of adding an availability-calendar picker to the manual booking modal, so the new feature doesn't land on top of an already-oversized file.
  • Extracted sections (all self-contained — verified no shared variables/functions leak across the split): "Live booking status" (inline status dropdown on the bookings list), "Delete booking" (delete-booking confirmation dialog), "Manual booking creation" (the "Create booking manually" modal), "Edit booking" (the edit-booking modal).
  • `admin-bookings.js` is enqueued alongside `admin.js` (`class-tb-admin.php`), with `tb-admin` as an explicit dependency so it loads after and can use the same `TB_Admin` localization object.
  • Each extracted section wrapped in its own `$(function(){...})` — safe since jQuery supports multiple document-ready registrations across script files.
  • Brace/paren balance verified on both files after the split (0/0 diff on each).
v1.72.40 August 2026
▼
  • **Fixed: manually creating an online booking in the therapist portal ("Create booking") never created a Zoom/Teams meeting.** `ajax_portal_create_booking()` hardcoded `delivery_type => 'physical'` regardless of the selected service, so `tb_maybe_create_online_meeting()`'s `if ( $delivery !== 'online' ) return;` check always short-circuited. Now derives `delivery_type` from the selected service's own `delivery_type` — matches the behavior of the public booking flow, which already sends the service's real delivery type.
  • **Removed the "optional — client chooses" (both) service delivery type entirely.** It was effectively unused in practice — clients always pick a service that's already explicitly online or physical — and added meaningless complexity throughout the booking flow (a whole radio-selection UI block, JS branching, and extra filtering conditions that existed purely for a state nobody used). `delivery_type` is now `physical` / `online` / `phone` only, everywhere.
  • ⚠️ Crosses into TB Booking Flow chat's territory (`class-tb-ajax-booking.php`, `class-tb-shortcodes.php`, `booking.js`) — one cohesive piece of work, solved together here per Søren's request. Flagged in both `handover-tb-admin.md` and `handover-tb-booking.md`.
  • Not yet tested in a real WordPress installation.
v1.72.39 August 2026
▼
  • **Fixed: manual booking creation in the therapist portal ("Create booking", `terapeutadmin`/`tpadmin`) always failed with "Security error. Reload the page and try again."** Root cause: `ajax_portal_create_booking()` has required CSRF verification (`verify_csrf()`) since v1.71.50, but the "Create booking" form's submit handler in `portal-app.php` built its `fetch()` call directly with a raw `URLSearchParams` object, bypassing the shared `post()` helper that every other AJAX call in the file uses to attach `TB_PORTAL.nonce`. The nonce was therefore never sent, and the request failed CSRF verification on every attempt — this has been broken since v1.71.50 (June 2026), only reported now.
  • Fix: added `nonce: TB_PORTAL.nonce || ''` to the request body, matching the pattern used everywhere else in the file. No changes to the server-side handler, database, or public API.
  • Same `portal-app.php` file serves both `terapeutadmin` (standalone installations) and `tpadmin` (SaaS therapists on bookbookbook.dk) — the fix covers both without any tb-saas changes.
  • `pbLoadSlots()` (fetches available time slots for the form) intentionally still doesn't send a nonce — `ajax_portal_get_slots()` is read-only and was never CSRF-protected, so this was correct as-is.
v1.72.38 August 2026
▼
  • **Fixed: therapist portal calendar legend (Availability tab, `terapeutadmin`/`tpadmin`) was missing the "online only" option.** The underlying feature — a 4th day-blocking state ("online only", teal, added in v1.71.58) — was already fully functional in the portal (toggle cycle in `ajax_toggle_blocked()`, rendering in `portal-app.php`), but `portal-dashboard.php`'s legend below the calendar only ever listed Morning/Afternoon/Full day/None. The wp-admin equivalent legend (`admin/therapists/page-form.php`) already listed all 4 states — only the portal's legend was ever updated to match when the feature was originally built. This made the feature effectively undiscoverable for therapists, even though clicking a day 4 times already produced the correct teal "online only" state.
  • Added the missing "Online only" legend entry to `portal-dashboard.php` (teal swatch, same color as the calendar JS uses).
  • Fixed the click-count hint text ("Click a day to cycle — 4th click removes.") — with the online state in the cycle, it now takes 5 clicks to return to "none", not 4. Text updated accordingly.
  • No changes to the toggle logic, database, or public API — display/text only.
  • "Online only" was also missing entirely from the language catalog (used in wp-admin's legend too, but was never translatable). Added to `languages/therapist-booking-en_US.po`/`.mo` ("Online only"), along with the updated 5-click hint text. `.mo` recompiled from the `.po` source with the same custom script as v1.72.37 (no `msgfmt`/PHP CLI available) — verified: old `.mo` had 1,198 records (1,197 real + header) vs. the `.po`'s 1,198 unique `(msgctxt, msgid)` entries at the time (a pre-existing 1-entry gap from an earlier manual build, now also incidentally closed); new `.mo` has 1,200 records (1,199 real + header), correctly reflecting the one new string.
v1.72.37 August 2026
▼
  • **Fixed stale help text for "Portal session timeout" setting** (`admin/settings/tab-generelt.php`) — still said "Default is 480 min. (8 hours)" and the input's own fallback value defaulted to 480, both left over from before v1.72.36 changed the code default to 2880 min (48h). Text now also mentions the new 60-day hard cap. Purely a display fix — the setting itself already worked correctly regardless of what the help text said; sites with an explicitly saved `portal_session_minutes` value (e.g. an old test value) are unaffected either way, since the field always takes precedence over the code default.
  • English translation (`languages/therapist-booking-en_US.po`/`.mo`) updated to match. `.mo` was recompiled from scratch with a small custom script (no `msgfmt`/PHP CLI available in this environment) — verified against all 1,198 catalog entries including the 10 plural-form strings and the UTF-8 charset header, to avoid silently dropping unrelated translations.
v1.72.36 August 2026
▼
  • **Therapist portal session: extended sliding idle timeout (8h → 48h) + new hard cap (60 days).** Session already renewed on every valid request (`renew_session()`, unchanged) — only the default `portal_session_minutes` changed (480 → 2880). New: a `login_at` timestamp is now stored in the session cookie payload at login and preserved (not reset) across renewals; `get_session_therapist()`/`get_session_locale()` now also reject the session once `MAX_SESSION_DAYS` (60, a fixed class constant — not an admin setting) has elapsed since the original login, regardless of activity. This affects both `terapeutadmin` (standalone installations) and `tpadmin` (SaaS therapists on bookbookbook.dk, since tb-saas's magic-login flow mirrors this exact cookie format) with no tb-saas changes required.
  • Cookies from before this version (no `login_at` field) are grandfathered: the 60-day clock starts at the first renewal after upgrade instead of logging everyone out immediately.
  • `clear_session()` is now called explicitly when a session is rejected for exceeding the hard cap, so a permanently-expired cookie doesn't linger client-side.
v1.72.35 August 2026
▼
  • **Merged forward from a parallel calendar-feature session that had drifted onto a stale v1.72.16 base** — this release ports the one still-missing piece (an explicit "set active calendar" action) onto the real v1.72.34 codebase, verified line-by-line against it so nothing from the parallel `services`/`booking_page_url`/portal-menu-centering work (v1.72.17–v1.72.34) was disturbed.
  • **New: "Set as active calendar" button** in each of the three therapist-portal calendar panels (CalDAV/Google/Microsoft 365). Previously `calendar_type` only ever changed as a side effect of connecting or disconnecting a provider — a therapist connected to both Google and Microsoft 365 (tokens for both can coexist) had no way to freely switch between them without redoing OAuth. New `ajax_set_calendar_type()` in `class-tb-therapist-portal-ajax-calendar.php` validates the target type actually has valid credentials (and, for Microsoft, the `microsoft_calendar` license feature) before switching.
  • **Fixed:** `class-tb-google-calendar.php::disconnect()` and `class-tb-microsoft-calendar.php::disconnect()` previously reset `calendar_type` back to `'caldav'` unconditionally, even when disconnecting a provider that wasn't the active one. Both now only reset `calendar_type` when the provider being disconnected was actually the active one.
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.34 August 2026
▼
  • **Fixed: therapist portal top bar (header + nav menu) was full viewport width while the content below (`.portal-body`) was capped at `max-width:1000px` and centered** — on wide viewports this made the menu/header visually detached from the content card beneath it. Not SaaS-specific (checked tb-saas's own CSS for class-name collisions — none found, it uses a `.tbs-` prefix); this was a plain pre-existing gap in `portal-styles.php`.
  • `.portal-header` and `.portal-nav` now also get `max-width:1000px; margin-left:auto; margin-right:auto;`, matching `.portal-body` exactly. Mobile breakpoint (`@media(max-width:680px)`) unaffected — viewport is already narrower than 1000px there.
v1.72.33 August 2026
▼
  • **New: `TB_Booking::get_booking_page_url( $therapist_id = 0 )` centralizes resolution of the booking page URL, replacing duplicated logic at 8 call sites across 6 files.** Default behavior is unchanged for standalone installations — permalink of `tb_settings['booking_page']`, falling back to `home_url('/')`.
  • **New neutral filter: `tb_booking_page_url( $default_url, $therapist_id )`.** No listeners = no effect. Lets a Shell (e.g. tb-saas) override the booking URL per company on a multi-tenant installation, where a single global `booking_page` option makes no sense — each clinic should have its own booking page.
  • Updated call sites: `class-tb-stripe.php` (success + cancel redirect), `class-tb-ajax-payment.php` (success + failed redirect), `class-tb-email-booking.php` (`send_payment_failed()`), `class-tb-shortcodes.php` (payment pending/failed page), `admin/class-tb-admin-services.php` (deep-link column), `includes/therapist-portal/sections/section-services.php` (portal deep link).
  • Fixes the symptom where the therapist portal's deep link (`/tpadmin/` → Services) was empty on the SaaS installation, since `$booking_base_url` resolved to an empty string there.
v1.72.32 August 2026
▼
  • **New: services hidden from the website by the clinic (`show_on_website = 0`, set in wp-admin or the create/edit dialog) are now grayed out in the portal's Services list, with the toggle disabled.** A therapist can see the service exists but cannot activate it themselves — matches the clinic-level flag being the clinic's own decision, not something an individual therapist should be able to override.
  • Row opacity dims further (0.35) and the toggle switch gets `disabled`, `cursor:not-allowed`, and a tooltip explaining why. A small "Hidden by the clinic" badge appears next to the service name.
  • No backend change needed — `ajax_save_services()` already only processes what's actually submitted, and a disabled checkbox's state is simply left untouched by the therapist (JS still reads its current value for the save payload, unaffected by the browser's native disabled-field submission behavior since the save flow builds its own POST body).
v1.72.31 August 2026
▼
  • **Course-corrected after v1.72.23's approach turned out to be wrong.** Per Søren's clarification of the actual intended process: every service with "Show on web" (show_on_website) checked should always appear in the client's general service list (step 2) — regardless of whether any therapist currently offers it. Filtering by therapist availability belongs at the *therapist-selection* step (step 3), where a therapist who doesn't offer the selected service should be grayed out and unselectable — not by hiding the entire service from the list.
  • **`TB_Ajax_Booking::get_all_services()`**: removed the `get_offered_ids()` filtering added in v1.72.23. Now only gates on `show_on_website` (plus the existing deep-link preselect override and online-only filter), matching the originally intended, simpler process.
  • **Found and fixed the actual bug behind "a therapist can be selected for a service they don't offer, regardless of their toggle state": `TB_Ajax_Booking::get_therapists()`'s query for which therapists offer a service was missing `AND active = 1`.** It only checked whether a link *row existed*, not whether it was active — so a therapist who had toggled a service off still showed as offering it. The frontend (`booking.js`) already correctly grays out and disables selection for therapists where `offers_service` is false — this was purely a data bug in the query feeding that logic, now fixed with the missing `active = 1` condition.
  • `TB_Service::get_offered_ids()` (introduced in v1.72.23, only ever used by the now-reverted check) removed as dead code.
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.30 August 2026
▼
  • **Fixed the actual toggle bug: v1.72.24–26 had wrongly coupled the portal list toggle to a global flag (`active` in v1.72.24, `show_on_website` in v1.72.26) for a therapist's own services, and forced their own link to always stay active regardless of the toggle.** This meant a therapist could never turn off their own display for a service they created, and the toggle's effect was inconsistent depending on ownership — exactly the reported symptoms ("toggle doesn't work when a service has multiple therapists linked", "can't remove display for myself").
  • **Reverted to the correct, final three-layer model, fully clarified by Søren:**
  • `ajax_save_services()`: removed the owned-service special-casing entirely — the toggle now always just updates the therapist's own link's `active` field, for every service, and never touches `tb_services.active`/`show_on_website` again.
  • Portal template (`section-services.php`): toggle's checked-state always reflects the therapist's own link, regardless of ownership.
  • Clarified for Søren: a service still showing to clients after one therapist turns their own display off, because a *different, real* therapist still has it active, is expected behavior for a shared multi-therapist service — not a bug (this is distinct from the now-fixed "ghost therapist" issue in v1.72.29, which was about *nonexistent* therapists).
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.29 August 2026
▼
  • **Found the "ghost therapist" bug behind the remaining inconsistent visibility: `TB_Therapist::delete()` never cleaned up `tb_therapist_services` when a therapist was deleted.** Every deleted therapist (including test accounts created during earlier sessions) left orphaned link rows behind, still referencing their now-nonexistent `therapist_id`. These orphaned rows were counted as real therapists everywhere the table was queried without checking the therapist still exists — explaining both the inflated/inconsistent "X therapists" counts in the admin services list and services appearing bookable to clients even when no real, current therapist actually offers them (since `get_offered_ids()` had no way to distinguish a real active link from a ghost one).
  • `TB_Therapist::delete()` now also deletes the therapist's `tb_therapist_services` rows.
  • `TB_Service::get_offered_ids()` (drives client-facing visibility, `get_all_services()`) now `JOIN`s against `tb_therapists` — a link can only count as "offered" if the therapist it references still exists. Defense in depth: even if some future code path again left orphaned rows, they could never again make a service appear bookable.
  • `admin/class-tb-admin-services.php`'s therapist-count column: same `JOIN` hardening applied.
  • New idempotent migration in `class-tb-database.php`: deletes any existing orphaned `tb_therapist_services` rows (referencing a deleted therapist) on upgrade — safe to run repeatedly, no-op once clean.
  • Confirmed via code audit: only two places in the entire codebase delete from `tb_therapist_services` — `TB_Service::delete()` (when the whole service is deleted) and the newly-fixed `TB_Therapist::delete()` (when the whole therapist is deleted). No code path deletes a single link as a side effect of toggling active/visible anymore (v1.72.28's fix confirmed complete on audit).
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.28 August 2026
▼
  • **Fixed the real root cause of the unreliable service toggle: the admin therapist-edit page's save handler deleted the therapist↔service link entirely for any unchecked service, instead of just marking it inactive.** `admin/class-tb-admin-therapists.php`'s save handler built its `$links` array by skipping any unchecked service (`if ( empty( $svc_data['active'] ) ) continue;`) before calling `TB_Service::save_therapist_links()` — which in turn deleted any existing link not present in the submitted set. Every time an admin saved that page with a service unchecked, the underlying `tb_therapist_services` row was permanently removed, not deactivated. This explains the whole saga across v1.72.23–27: unreliable toggle behavior, services showing "None" (no linked therapist) in the admin list, and the fluctuating therapist count.
  • Fixed the save handler to include every submitted service (checked or not) with `active` reflecting the checkbox state, so `save_therapist_links()` only ever updates the existing row's `active` flag.
  • **`TB_Service::save_therapist_links()`'s delete branch removed entirely.** Per clarified business rules: a therapist's *linkage* to a service is a structural connection that toggling active/visible must never remove — only the `active` field on an existing link may change. Both callers (admin's therapist-edit page and the portal's Services tab) already submit a full/complete set on every save, so this delete branch was unnecessary and actively harmful.
  • ⚠️ **Cannot un-delete links that were already wiped by this bug before the fix.** If `admin/class-tb-admin-services.php`'s list shows "None" for a service that should have a therapist (e.g. Couples therapy - Online, Sexology consultation - Online per the screenshots that surfaced this bug), the underlying link is genuinely gone and must be manually re-checked once on the therapist-edit page (image 3 in the bug report) — the fix only prevents this from happening again going forward.
  • Confirmed three independent layers per Søren's clarification, now correctly preserved by this fix:
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.27 August 2026
▼
  • **Fixed: unreliable toggle persistence for some services + fluctuating "X therapists" count in admin (1↔2 for a single therapist).** Root cause: the `UNIQUE KEY therapist_service (therapist_id, service_id)` on `tb_therapist_services` had apparently never actually been applied on existing installations — `dbDelta()` is notoriously unreliable at adding a *missing* index to an already-existing table, even though the `CREATE TABLE` definition always included it. Without that constraint enforced, duplicate rows for the same (therapist, service) pair could accumulate, which explains both symptoms: `admin/class-tb-admin-services.php`'s therapist count uses `COUNT(*)` (not `COUNT(DISTINCT therapist_id)`) and so counted duplicate rows as extra therapists, and the portal's toggle-save logic could update/insert the wrong one of several rows for the same link.
  • New idempotent migration in `class-tb-database.php`: checks for the unique index via `SHOW INDEX FROM`; if missing, deletes duplicate rows (keeping the newest per pair) before adding the constraint — runs once, safe to re-run (no-op once the index exists).
  • No code changes needed in the toggle-save logic itself — this was a data-integrity issue, not a logic bug in the v1.72.21-26 work.
  • Moved the "Save changes" button from the Services card header down to the bottom of the list, next to "+ Create new service".
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.26 August 2026
▼
  • **Revised model after clarification: "Active" and "Show on website" are two independent global flags**, not one control as v1.72.24–25 assumed. "Active" (`tb_services.active`) is back as a separate checkbox in the portal's create/edit dialog — it governs whether the service can be booked at all, used for special services distributed only via a direct link without appearing in the general listing. "Show on website" (`tb_services.show_on_website`) governs whether it appears in the general listing/`[therapist_services]` shortcode.
  • **For services a therapist owns, the list toggle now reflects/controls `show_on_website`** instead of the old per-therapist link — set one, the other follows, in both UI locations. `ajax_save_services()` syncs `tb_services.show_on_website` (not `active`) to the toggle for owned services; the owner's own link is protected from being touched by this save (see below).
  • **For services a therapist doesn't own (admin-created), the toggle is unchanged** — it still only controls that therapist's own opt-in link (`tb_therapist_services.active`), the original pre-v1.72.22 behavior.
  • **The owner's own link is now set active automatically at creation** (`TB_Service::set_therapist_link_active()`, restored) and kept permanently active — creating a service implies offering it yourself, no separate per-therapist toggle needed for that anymore.
  • **New: deep link + copy button on every service row in the portal's Services list**, mirroring the existing wp-admin UI (`add_query_arg('service_id', ..., $booking_base_url)` + clipboard button) — makes the "special service via direct link" workflow usable entirely from the portal.
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.25 August 2026
▼
  • **Simplified: removed the "Active" checkbox from the portal's create/edit service dialog.** The toggle switch in the Services list is now the sole active/inactive control, for both owned and non-owned (admin-created) services — resolving user confusion from having two separate, imperfectly-synced controls (checkbox in dialog vs. toggle in list, introduced in v1.72.22/v1.72.24).
  • `TB_Service::set_therapist_link_active()` (added in v1.72.24) removed again — no longer called from anywhere now that the dialog doesn't touch `active` at all.
  • `ajax_create_service()`: new services are now always created with `tb_services.active = 1` (globally available) and no link — matching the original v1.72.22 intent ("create only, therapist activates via the list toggle afterward"), now made consistent with the single-control model.
  • `ajax_update_service()`: no longer includes `active` in the data passed to `TB_Service::save()`, so editing other fields (name, price, etc.) never touches the active/inactive state.
  • `ajax_save_services()` (unchanged from v1.72.24): for services the therapist owns, toggling the list switch still automatically syncs `tb_services.active` (the wp-admin "Active" checkbox) to match — this is now the only direction that matters, since the dialog no longer has a competing control.
  • ⚠️ Known limitation, not addressed this session: if a service is shared and toggled on by multiple therapists, one owner turning their own toggle off will also flip the global `tb_services.active` off for everyone (since the sync doesn't check whether other therapists still have it active). Low risk in the current single/small-clinic usage pattern; flagged for future consideration if multi-therapist adoption of peer-created services becomes common.
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.24 August 2026
▼
  • **Fixed: the "Active" checkbox in the portal's create/edit service dialog could never be unset.** `portal-app-services.php` always sent the `active`/`show_on_website`/`deposit_required` POST keys (as an empty string when unchecked); the server-side `isset( $_POST[...] )` check is true either way, so unchecking any of these fields in the dialog had no effect — they were always saved as on. Fixed by omitting the key entirely when unchecked, matching how a native HTML checkbox is omitted from `$_POST`, which is what the server-side check already assumed.
  • **New: the global "Active" checkbox (`tb_services.active`) and the therapist's own toggle in the Services list (`tb_therapist_services.active`) now stay in sync for services the therapist owns** — setting one sets the other, in both directions. New `TB_Service::set_therapist_link_active()` for a single-row, non-destructive upsert (unlike `save_therapist_links()`, which replaces a therapist's entire link set and is unsafe to call for just one service). `ajax_create_service()`/`ajax_update_service()` sync the owner's own link to match "Active"; `ajax_save_services()` syncs `tb_services.active` to match the list toggle, but only for services the therapist owns — toggling a non-owned (e.g. admin-created) service in the list still only affects that therapist's own link, never the global flag.
  • **This supersedes the v1.72.22 decision that a newly created service should not auto-link to its creator.** Since "Active" defaults to checked in the create dialog and now drives the link automatically, a new service is linked and activated for its creator immediately unless "Active" is unchecked at creation time.
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.23 August 2026
▼
  • **Fixed: newly created services were visible to clients in the booking widget even when no therapist had linked/activated them.** Root cause found while investigating a report that a service, deliberately left un-toggled by the creating therapist (portal "Services" tab, v1.72.22), still appeared in the client-facing service list. `TB_Ajax_Booking::get_all_services()` (step 2 of the booking flow, service selection before therapist selection) queried `TB_Service::get_all( true )`, which only checks `tb_services.active = 1` — it never checked whether any therapist actually offers the service (`tb_therapist_services`, `active = 1`). This gap pre-dates v1.72.22 (an admin-created service with no therapist links yet would already trigger it), but v1.72.22 made it trivial to hit: a therapist can now create a service (defaults: active + shown on website) without any auto-link, exactly the scenario this bug needed.
  • New `TB_Service::get_offered_ids()` — the set of service IDs linked and active for at least one therapist.
  • `get_all_services()` now skips any service not in that set, unless it's the deep-link-preselected service (`preselect_id`) — same override pattern already used for the `show_on_website` check, so deep links to admin-hidden-but-offered services are unaffected.
  • ⚠️ **Crosses into TB Booking Flow's component** (`includes/class-tb-ajax-booking.php`) — flagged in both `handover-tb-admin.md` and `handover-tb-booking.md`, per the "one coherent piece of work" exception in CHAT_REGLER.md (same precedent as the Google/365 SaaS fix in v1.72.20/tb-saas v2.9.84).
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.22 August 2026
▼
  • **Therapists can now create, edit, and delete their own services from the therapist portal** ("Services" tab), not just toggle existing ones on/off. A new service is visible/activatable clinic-wide, same as before — no ownership restriction on visibility. Editing/deleting is restricted to the therapist who created the service; admin-created services (created from wp-admin) cannot be edited or deleted from the portal by any therapist.
  • New nullable column `tb_services.created_by_therapist_id` (idempotent `ALTER`, `class-tb-database.php`) — `NULL` for admin-created/pre-existing services.
  • `TB_Service::save()`: added `created_by_therapist_id` to its writable field list, and a new `tb_service_insert` filter applied right before `$wpdb->insert()` on the create path (mirrors `tb_booking_insert` in `class-tb-booking.php`) — no-op without a listener, the integration point a future SaaS Shell session would use for company-scoping on create.
  • New `includes/class-tb-therapist-portal-ajax-services.php` — session-authenticated create/update/delete handlers, validation mirrored from `admin/class-tb-admin-services.php::save_service()` (all fields except `sort_order`). Ownership check (`created_by_therapist_id` vs. session therapist ID) happens in the handlers before update/delete — `TB_Service::delete()` itself is unchanged and remains callable without a check from the admin side.
  • New `includes/therapist-portal/portal-app-services.php` — a **separate, self-contained `` block** (own IIFE), same reasoning as `portal-app-calendar.php`: `portal-app.php` is already over the 1,000-line threshold and is not touched by this feature.
  • `sections/section-services.php`: "+ Create new service" button and a create/edit dialog (all admin fields except `sort_order`); Edit/Delete buttons shown only on rows the logged-in therapist owns.
  • Not in scope this session: tb-saas's own listener on the new `tb_service_insert` filter (company_id scoping on therapist-created services) — deferred to a dedicated SaaS Shell session after this TB core work is tested.
  • ⚠️ Not yet tested in a real WordPress installation.
v1.72.21 August 2026
▼
  • **Pure structural split, no behavior change.** Extracted the "Services" section out of `includes/therapist-portal/portal-dashboard.php` (804 → 742 lines) into a new `includes/therapist-portal/sections/section-services.php`, same pattern as `section-calendar.php` in v1.72.17. Prerequisite for the self-service create/edit/delete feature added in v1.72.22.
v1.72.20 August 2026
▼
  • **Fixed: Google/Microsoft 365 self-connect from the therapist portal failed for SaaS clinic therapists** (bookbookbook.dk `/tpadmin/`), while working correctly for standalone customers. Root cause: bookbookbook.dk hosts both the TB OAuth Relay server *and* its own TB core installation, so `TB_Relay_Client::get_auth_url()`'s `site => home_url()` param unintentionally matched the relay's own `site === home_url()` SaaS-detection heuristic — routing the request into the relay's SaaS branch, which expects `company_id`/`redirect_to` params that the standalone-oriented client never sends. Result: tokens were fetched from Google but discarded by tb-saas's own company-scoping guard (`company mismatch ... expected=0`).
  • `includes/therapist-portal/sections/section-calendar.php`: both connect-URL builders (Google and Microsoft) now pass through a new filter, `tb_therapist_portal_calendar_connect_url( $default_url, $therapist, $provider )`, before being used. No-op without a listener — standalone installations are unaffected. This is the integration point Shell plugins use to substitute their own SaaS-aware auth URL (see tb-saas v2.9.84).
v1.72.19 August 2026
▼
  • **`class-tb-relay-client.php`: portal support for TB OAuth Relay pickup.** `handle_pickup()` now hooks `init` instead of `admin_init` (the latter never fires on a front-end page, so the therapist portal could not complete a relay-based connection at all), and its authorization check accepts either `manage_options` (unchanged admin flow) or a valid portal session matching the exact therapist ID in the pickup URL — a therapist can only pick up tokens for their own row.
  • Success and error redirects (`redirect_with_error()` and the success branch in `handle_pickup()`) now branch on `is_admin()` to send the browser back to wp-admin or to the therapist portal (`TB_Therapist_Portal::portal_url()`) depending on where the flow was initiated.
  • `get_auth_url()` gains an optional third `$return_url` parameter, forwarded to the relay server (requires tb-oauth-relay v1.0.16+; older relay versions ignore the parameter and keep redirecting to wp-admin, so this is backward compatible without a coordinated upgrade).
  • ⚠️ Not yet tested against a live relay-enabled installation.
v1.72.18 August 2026
▼
  • **Therapists can now self-connect Google Calendar and Microsoft 365 from the therapist portal** (`/terapeutadmin/` → Calendar), in addition to the existing CalDAV/iCal fields. Full feature parity with the admin-side connection UI (`admin/therapists/page-form.php`): connect/disconnect, Google calendar picker, diagnostics (test slot lookup + log view/clear) for both providers, and the Teams toggle (license-gated on `teams` feature) for Microsoft 365. Microsoft 365 connection itself is gated on the `microsoft_calendar` license feature, matching the admin side.
  • New `includes/class-tb-therapist-portal-ajax-calendar.php` — session-authenticated mirrors of the existing `manage_options`-gated admin AJAX handlers (`tb_google_*`/`tb_ms_*` in `therapist-booking.php`). The therapist ID is always derived from the portal session, never from POST data, so a therapist can only modify their own connection.
  • New `includes/therapist-portal/portal-app-calendar.php` — a **separate, self-contained `` block** for this feature (its own IIFE with a small local `post()` helper), deliberately not merged into `portal-app.php`'s shared state closure — that file is already over the 1,000-line mandatory-split threshold (see handover-tb-booking.md) and splitting its internal closure is a larger, separate task. This file only shares the global `TB_PORTAL` object, already printed on the page before it runs.
  • **Fixed:** the error/cancel branches in `class-tb-google-calendar.php::handle_callback()` and `class-tb-microsoft-calendar.php::handle_callback()` previously redirected straight to a hardcoded wp-admin URL, bypassing the `tb_calendar_callback_redirect` filter entirely (only the success branch went through it). Both now look up the therapist ID from the OAuth state transient and route through the same filter, now called with a new optional fourth `$error` parameter (`null` on success). This was a prerequisite for the portal to be able to show its own error banner instead of the therapist landing on a wp-admin URL they have no access to.
  • `class-tb-therapist-portal.php`: new `maybe_redirect_to_portal()` filter callback hooked to `tb_calendar_callback_redirect` — only acts when a short-lived `tb_calendar_origin_portal_{id}` transient is present (set in `sections/section-calendar.php` right before rendering the direct-flow connect link), so the existing wp-admin flow for other TB core customers is completely unaffected.
  • ⚠️ Not yet tested in a real WordPress installation — covers all of: connect/disconnect for both providers, Google calendar picker, diagnostics/log for both, Teams toggle, and the redirect-back-to-portal behavior for both success and error cases.
v1.72.17 August 2026
▼
  • **Pure structural split, no behavior change.** Extracted the "Calendar integration" card (CalDAV + iCal fields) out of `includes/therapist-portal/portal-dashboard.php` (851 → 804 lines) into a new `includes/therapist-portal/sections/section-calendar.php`, included via the existing shared-variable-scope pattern (see FIL-SPLIT-VEJLEDNING.md). Prerequisite for the Google/365 self-connect feature added in v1.72.18, which lives entirely in the new file.
v1.72.16 August 2026
▼
  • **Loading state on the date-picker (step 4, "Vælg dato").** Clients previously saw all calendar days rendered in their inert/unavailable style with no feedback while `tb_get_available_dates` fetched real-time availability from the therapist's connected calendar (Google/Microsoft/CalDAV) — indistinguishable from "no dates available", and confusing during the network round-trip.
v1.72.15 August 2026
▼
  • **`TB_Updater::check_for_update()`: `$obj->tested` now reads the `tested` field from the License Server's version-check response instead of a hardcoded empty string.** Falls back to `''` (unchanged behavior) if the field is absent, which is the case until License Server + Release Manager gain support for a "tested up to WP version" value.
  • No other changes. This does not by itself fix the "not tested" compatibility badge shown on the Plugins page — that requires the License Server side to start sending the field.
v1.72.14 August 2026
▼
  • **Split the AJAX handlers out of `includes/class-tb-therapist-portal.php` (1,056 → 393 lines).** Pure structural change — no changes to business logic, public API, or REST/AJAX contract. Continues the v1.72.13 split of the same file.
  • 18 AJAX methods + `maybe_consume_magic_token()` extracted into four new domain classes, grouped by concern:
  • The router class (`TB_Therapist_Portal`) keeps session/auth helpers, `init()`, `on_activate()`, `ensure_portal_page()`, `render_shortcode()`, and the render/CSS wrappers from v1.72.13. All ~37 `add_action('wp_ajax_...')` / `add_action('wp_ajax_nopriv_...')` registrations in `init()` updated to point at the new classes' methods.
  • **Visibility change (necessary for the split):** four session helpers previously `private static` — `session_ttl()`, `set_session()`, `clear_session()`, `verify_csrf()` — are now `public static`, since the moved AJAX methods call them cross-class (matches the existing pattern for `get_session_therapist()`/`portal_url()`, which were already public). All `self::` calls to these from the moved methods were replaced with explicit `TB_Therapist_Portal::` calls, per the documented "self:: doesn't work across classes" rule in FIL-SPLIT-VEJLEDNING.md.
  • The 4 tb-saas SaaS hooks (`tb_therapist_portal_access`, `tb_therapist_portal_login`, `tb_therapist_portal_booking_args`, `tb_therapist_portal_services`) moved unchanged along with their respective methods — two stayed on the router (`_access` in `render_shortcode()`, `_booking_args` in `render_dashboard()`), two moved to new classes (`_login` in `Ajax_Account::ajax_login()`, `_services` in `Ajax_Profile::ajax_save_services()`).
  • **Verified (static only):** braces balance (0 diff) in all five files; no `self::` references left in any of the four new files; no external callers anywhere in the plugin reference the moved methods under the old `TB_Therapist_Portal::ajax_*`/`::maybe_consume_magic_token` names.
  • **⚠️ Not yet tested in a real WordPress installation.** See test checklist in handover-tb-admin.md before production — this covers every portal write action (login/logout, booking CRUD, profile, availability, services, GDPR, blocked dates, iCal/CalDAV tests, magic-link login).
v1.72.13 August 2026
▼
  • **Split `includes/class-tb-therapist-portal.php` (3,145 → 1,056 lines).** Pure structural change — no changes to business logic, public API, or rendered output. File was far over the 2,000-line critical threshold in CHAT_REGLER.md.
  • Four private static render/CSS methods converted to thin `include`-based wrappers, each delegating to a new template file under `includes/therapist-portal/`:
  • One `self::session_ttl()` call originally inside `render_js()`'s body was replaced with a pre-computed `$session_ttl` variable passed into the template, per the documented "self:: doesn't reliably work in templates" pitfall in FIL-SPLIT-VEJLEDNING.md.
  • AJAX handlers (18 methods, ~668 lines) were intentionally left untouched — split into domain files is planned as a separate, later task.
  • **Verified (static only):** braces balance (0 diff) in the main file and all four new template files; no `self::`/`$this` references left in any template; no external callers anywhere in the plugin call these four (private) methods directly — only the class's own `self::get_css()`/`self::render_login()` call sites, unaffected by the extraction.
  • **⚠️ Not yet tested in a real WordPress installation.** See test checklist in handover-tb-admin.md before production.
v1.72.12 August 2026
▼
  • **Fix: border color field was skipped when switching design theme via the theme swatches in Settings → Design.** The JS theme-switcher updated background/text/accent color fields automatically on click, but never included `tb_d_border` in its field map — so the border color silently kept whatever value was previously saved (e.g. the original "Mørkt" theme's amber/gold border `#4a3a20`) even after switching to a completely different theme, including the new monochrome themes. Payment-method option cards and other bordered elements therefore kept showing a gold ring on themes that shouldn't have one.
  • `tb_d_border` added to the theme-switch field map (`admin/settings/tab-design.php`) — clicking a theme swatch now resets the border color too, same as every other field.
  • **Note for existing installs:** clinics who already picked a theme before this fix need to click the theme swatch again (or hit "Nulstil" next to Kantfarve) and save once, since the stale border value is already stored in `tb_booking_design` and won't self-correct without a resave.
  • Consent checkbox size reduced further (20px → 17px) and checkmark re-proportioned for a tighter, better-centered fit within the box.
v1.72.11 August 2026
▼
  • **Fix: consent checkbox (privacy policy agreement) was hardcoded to a fixed dark/gold color scheme instead of following the selected design theme.** Unchecked box background (`#2a2a2a`) and border (`#888`) stayed dark regardless of theme, and the checked state was always gold (`#e8c030`) even on light or monochrome themes.
  • Checkbox now uses the theme's CSS variables: unchecked background follows `--tb-dark-card`, border follows `--tb-border`, hover/checked state follows the theme's accent color (`--tb-gold` / `--tb-gold-rgb`).
  • **New:** checkmark color now uses a new `--tb-btn-text` variable (same contrast color used on primary buttons) instead of a hardcoded near-black, so it stays legible against the accent color on every theme — including the new monochrome themes where the accent itself can be white.
  • Reduced checkbox size slightly (22px → 20px) and re-proportioned the checkmark so it sits better centered within the box.
  • Affects both the booking-flow consent field and the gift card/course purchase consent field (same shared CSS class).
v1.72.10 August 2026
▼
  • **Two new monochrome design themes added to Settings → Design:** "Sort-Hvid Mørkt" (Black-White Dark) and "Sort-Hvid Lyst" (Black-White Light). Pure black/white/grayscale palettes — accent color is white-on-black (dark theme) or black-on-white (light theme) instead of a hue, so buttons stand out through contrast rather than color.
  • Success/danger (error) colors kept as functional red/green in both new themes for at-a-glance readability of status badges.
  • No changes to preview JS, color-picker logic, or the save/validation flow beyond adding the two new theme keys to the allowed list — purely additive, same pattern as existing themes.
v1.72.09 July 2026
▼
  • **Bugfix: intermittent "technical error" on booking submission for clinics using Google Calendar or Microsoft 365 integration.** Reported by multiple clients across different installations and services; suspected (and confirmed by code review) to correlate with longer gaps between bookings.
  • **Root cause:** `TB_GoogleCalendar::get_valid_token()` and `TB_MicrosoftCalendar::get_valid_token()` refreshed an expired access token and saved it to the database, but never updated the in-memory `$therapist` object passed to them. For services with prep/cleanup buffer time, `tb_calendar_create_event()` reuses the *same* `$therapist` object for the main event and the prep/cleanup buffer events (`tb_calendar_create_buffer_events()` in `class-tb-caldav.php`). Each of these calls `get_valid_token()` again, and since the object still showed the old (expired) token in memory, every call triggered a fresh OAuth refresh request — up to 3 redundant, synchronous network calls to Google/Microsoft (each with a 15s timeout) on a single booking, all happening before the client received a response. Under network latency this could exceed PHP's execution time limit, causing the request to die without returning valid JSON — surfacing to the client as a generic "Der opstod en fejl" message (via the frontend's `.fail()` handler, not a graceful `wp_send_json_error`).
  • **Fix:** both `get_valid_token()` methods (direct refresh path and relay refresh path, Google + Microsoft) now also update the in-memory `$therapist` object's token fields after a successful refresh, so repeated calls with the same object within a single request reuse the fresh token instead of refreshing again.
  • This explains why the bug was hard to reproduce: retrying shortly after a failed booking would already have a freshly-refreshed (valid) token in the DB, avoiding the redundant-refresh path on the next attempt.
  • **Also added:** `TB_Booking::create()` now logs the actual `$wpdb->last_error` (plus therapist/date/time context) to `debug.log` when the booking insert fails, instead of failing silently with no diagnostic trail.
  • No change to public API, database schema, or calendar sync behavior — purely an internal caching/logging fix.
v1.72.08 Juli 2026
▼
  • **Split af `class-tb-email.php`** (var 1.018 linjer, over 1.000-linjers-grænsen i CHAT_REGLER.md). Ren struktur-ændring — ingen ændringer i email-indhold, forretningslogik eller det offentlige API.
  • `class-tb-email.php` er nu en tynd facade/router (84 linjer) — alle eksisterende `TB_Email::`-kald (fra ajax-, stripe-, mobilepay-, admin-, therapist-portal-, gdpr- og reminder-koden) fortsætter helt uændret.
  • Ny fil `includes/class-tb-email-core.php` → `TB_Email_Core`: delte hjælpefunktioner (`swap_locale_for/back`, `send()`, `set_html()`, `wrap()`).
  • Ny fil `includes/class-tb-email-booking.php` → `TB_Email_Booking`: booking-emails (bekræftelse, opdatering, aflysning, betalingsfejl, admin-notifikation, iCal-generering).
  • Ny fil `includes/class-tb-email-giftcards.php` → `TB_Email_Giftcards`: gavekort-emails.
  • Ny fil `includes/class-tb-email-courses.php` → `TB_Email_Courses`: forløbs-emails.
  • Ny fil `includes/class-tb-email-reminder.php` → `TB_Email_Reminder`: påmindelsesmail + rå admin-email (GDPR).
  • ⚠️ **Kryds-plugin-hensyn:** `TB_Email::wrap()` er bevidst bevaret (privat, tynd delegering) fysisk på `TB_Email`-klassen, fordi tb-saas' `class-tbs-scope.php` tilgår den via `ReflectionMethod('TB_Email','wrap')` som fallback. Fjernes den herfra, knækker tb-saas. Se `handover-saas-shell.md` — kendt post-launch-opgave at erstatte Reflection med en rigtig hook, ikke løst i denne split.
  • **Ikke testet i en rigtig WordPress-installation endnu** — kun statisk verificeret (klammer/parenteser balancerer i alle 6 filer, alle 18 oprindelige metoder til stede, ingen `self::`-referencer efterladt til metoder der er flyttet til `TB_Email_Core`).
v1.72.07 Juli 2026
▼
  • **"Gensend email"-knap for solgte gavekort og solgte forløb.** Klinikken kan nu gensende koden til klienten hvis den oprindelige email ikke er modtaget eller er blevet væk — uden at skulle udstede et nyt gavekort/forløb.
  • **Gavekort:** ny `admin_post_tb_resend_giftcard` → `TB_Admin_Giftcards::resend_giftcard()`. Henter det fulde gavekort (`TB_GiftCard::get_issued()`) og kalder `TB_Email::send_giftcard_confirmation()` igen (samme mail som ved oprindeligt køb, sendes til modtager og evt. køber). Fejlbesked hvis hverken modtager- eller køber-email er sat.
  • **Forløb:** ny `admin_post_tb_resend_sold_course` → `TB_Admin_Courses::resend_sold_course()`. Henter forløbet (`TB_Course::get_issued()`, inkl. `product_name`/`service_name` via eksisterende JOIN) og kalder `TB_Email::send_course_confirmation()` igen. Fejlbesked hvis klient-email mangler.
  • Ny knap "Gensend email" i Handlinger-kolonnen på begge "Solgte …"-lister, samme GET+nonce-mønster som eksisterende Slet-knap.
  • Ingen ny database-kolonne eller ændring i forretningslogikken for selve salget — udelukkende en gensend-funktion oven på eksisterende email-metoder.
  • **Udestående (tb-saas-chat):** samme "Gensend email"-knap skal tilføjes i klinikportalens "Solgte gavekort"/"Solgte forløb", med ejerskabsguard (`TBS_Portal_Data_Giftcards::get_giftcard()` / `TBS_Portal_Data_Courses::get_one_sold()`).
v1.72.06 Juli 2026
▼
  • **Admin-notifikation ved forløbssalg:** ny `TB_Email::send_course_admin_notification( $course )` — sender salgsdetaljer (klient, kontaktoplysninger, forløb, sessioner, beløb, forløbskode) til klinikkens admin-email. Mirror af det eksisterende `send_admin_notification()`-mønster for bookinger.
  • Nyt filter `apply_filters('tb_course_admin_notification_email', $admin_mail, $course)` — SaaS Shell kan override modtageren til klinikkens kontakt-email (mirror af `tb_admin_notification_email`). Eget filter fordi `$course` er et array, ikke et objekt.
  • Nyt neutralt filter `apply_filters('tb_course_insert', $row)` i `TB_Course::create()` — lader Shell stemple `company_id` på forløbsrækken før insert (mirror af `tb_booking_insert`). Ingen effekt uden listeners.
  • Kaldt fra alle 3 steder hvor `send_course_confirmation()` allerede kaldes: `class-tb-ajax-products.php` (betal-ved-behandling + normal aktivering), `class-tb-stripe.php` og `class-tb-mobilepay.php` (webhook-aktivering)
  • `class-tb-stripe.php`/`class-tb-mobilepay.php`: forløbs-data ved webhook-aktivering udvidet med `client_phone` og `price_paid` (var ikke med før, nu tilgængelig til admin-mailen)
  • ⚠️ **`class-tb-email.php` er nu 1.018 linjer — over 1.000-linjers-grænsen i CHAT_REGLER.md.** Bør splittes (fx i booking-emails / gavekort-emails / forløbs-emails / admin-notifikationer) inden næste feature tilføjes i denne fil.
  • **Udestående (tb-saas-chat):** `tb_course_insert` skal lyttes på for at stemple `company_id`, og `tb_course_admin_notification_email` skal lyttes på for at route til klinikkens `owner_email` — uden dette lander forløbs-admin-mails på site-adminnens `admin_email` for SaaS-klinikker, ikke klinikejerens egen adresse
v1.72.05 Juli 2026
▼
  • **Design-tema følges nu konsekvent i booking-widget'en (rettet 3 samhørende fejl):**
  • **Ny CSS-variabel `--tb-gold-rgb`**: RGB-triplet af det valgte temas accentfarve, udregnet i `tb_inject_design_css()` (hex→RGB) og som fallback i `:root` i `booking.css`. Gør det muligt at bygge tint/skygge-varianter af accentfarven uden at hardkode én bestemt temafarve
  • Ingen ændring i "Mørkt"-temaets udseende (samme RGB-værdier), men alle andre temaer (Lyst, Neutralt, Moderne Mørkt, Moderne Lyst) viser nu korrekte hover-, fokus- og accentfarver
v1.72.04 Juli 2026
▼
  • **Split af `class-tb-ajax.php`** — filen var vokset til ~1.026 linjer (over 1.000-linjers-grænsen i CHAT_REGLER.md). Ren struktur-oprydning, ingen ændringer i forretningslogik.
  • `class-tb-ajax.php` er nu en ren router (77 linjer): registrerer `wp_ajax_*`-hooks via en eksplicit action→klasse-mapping og ruter `tb_action`-URL-kald
  • **Ny fil `class-tb-ajax-booking.php`** (445 linjer): `get_therapists`, `get_all_services`, `get_services`, `get_available_dates`, `get_available_slots`, `create_booking`, `cancel_booking`
  • **Ny fil `class-tb-ajax-products.php`** (262 linjer): `get_giftcard_products`, `get_course_products`, `purchase_giftcard`, `purchase_course`, `validate_code`
  • **Ny fil `class-tb-ajax-payment.php`** (306 linjer): `handle_payment_return`, `handle_cancel_page` — begge ændret fra `private` til `public static`, da routeren nu kalder dem på tværs af klasser
  • `therapist-booking.php`: 3 nye `require_once`-linjer tilføjet efter `class-tb-ajax.php`
  • Verificeret: klammer/paranteser balancerer i alle fire filer (Python-tælling), ingen `self::`-referencer efterladt i de udtrukne filer, metodeantal matcher original 1:1
v1.72.03 Juli 2026
▼
  • **Forløbskøb indsamler nu samme klientoplysninger som booking:** telefon (valgfri), besked (valgfri), samtykke til privatlivspolitik (**påkrævet**, ligesom ved almindelig booking)
  • **Ny admin-mulighed: redigér solgte forløb.** Under Forløb → "Solgte forløb" er der nu Rediger/Slet-knapper pr. forløb — kan rette klientens navn, email, telefon, besked, sessioner brugt/i alt, udløbsdato og status. Mønsteret er 1:1 mirror af det eksisterende "Rediger gavekort" i gavekort-admin
  • `class-tb-database.php`: nye idempotente kolonner `client_phone` og `client_notes` på `tb_courses` (kører automatisk ved næste versionsbump, ingen genaktivering nødvendig)
  • `class-tb-course.php`: `create()` gemmer nu telefon/besked; nye metoder `get_issued()`, `update_issued()`, `delete_issued()` (mirror af `TB_GiftCard`)
  • `class-tb-shortcodes.php`: nye felter i forløbs-formularen (telefon, besked, samtykke-checkbox), genbruger `$privacy_link` fra booking-sektionen i samme metode-scope
  • `public/js/booking.js`: `submitCourse()` sender nye felter + validerer samtykke client-side
  • `class-tb-ajax.php` (`purchase_course()`): validerer samtykke server-side (påkrævet), gemmer telefon/besked
  • `admin/class-tb-admin-courses.php`: ny redigeringsformular + `tb_edit_sold_course`/`tb_delete_sold_course` admin_post-handlers
v1.72.02 Juli 2026
▼
  • **Forløbskøb: betalingsmetode-valg tilføjet.** Køb af forløb (`[therapist_booking]` → Forløb) understøttede før kun MobilePay implicit (payment_method blev aldrig sendt fra frontend). Der er nu et rigtigt valg mellem MobilePay, Kortbetaling (Stripe) og "Betal ved behandling" — styret af de samme indstillinger som almindelig booking (`allow_mobilepay`, `allow_card`, `allow_pay_at_clinic`)
  • **"Betal ved behandling" for forløb:** når valgt, springes betalingsgateway helt over — forløbet aktiveres med det samme og bekræftelsesmail sendes. Nyttigt til hurtigt at teste at `TB_Email::send_course_confirmation()` rent faktisk afsender, uden at skulle gennemføre en rigtig betaling
  • Intet ekstra licens-/plan-tjek tilføjet på Stripe/MobilePay for forløb — `courses`-featuren kræver allerede Klinik/Pro, som begge inkluderer `mobilepay`-featuren, så et ekstra tjek ville være redundant
  • `class-tb-shortcodes.php`: nye betalingsmetode-radioknapper i forløbs-købsformularen (trin `tb-step-cr-2`), skjules når forløbet er gratis
  • `public/js/booking.js`: `showCourseForm()`/`submitCourse()` sender nu `payment_method`; knapteksten skifter dynamisk (MobilePay/Kort/Betal ved behandling)
  • `class-tb-ajax.php` (`purchase_course()`): validerer `payment_method` mod `mobilepay`/`stripe`/`pay_at_clinic`
v1.72.01 Juli 2026
▼
  • **Marketing/sælgende tekst (ingen funktionsændringer):** Plugin-header `Description`-linjen omskrevet til en kortere, mere sælgende one-liner (nævner Stripe + MobilePay eksplicit)
  • **Ny rig beskrivelse i "Se detaljer"-popup** (`TB_Updater::plugin_info()` → `plugins_api`/`plugin_information`): udtrukket til ny privat metode `get_description_html()` i `class-tb-updater.php`. Struktureret med overskrifter, fed tekst og emoji-sektioner (booking, flere terapeuter, kalendersynk, betaling, kommunikation, sikkerhed, fleksibilitet) — betalingssektionen nævner både Stripe og MobilePay ePayment eksplicit
  • Ingen ændringer i update-check-logik, licensvalidering eller download-flow
v1.72.00 Juli 2026
▼
  • **Test-release (ingen funktionsændringer):** ren versionsbump til brug for test af automatisk plugin-opdatering (`TB_Updater` + License Server `version-check`/`download_url`-flow). Kodebasen er identisk med v1.71.59 bortset fra versionsnummeret.
v1.71.58 Juli 2026
▼
  • **Ny blokerings-type `online`:** terapeuten kan markere en dag som "kun online" — alle tidsslots vises normalt, men kun ydelser med `delivery_type = online` eller `both` tilbydes klienten
  • **Ny toggle-cykel:** ingen → hel dag blokeret (rød) → formiddag blokeret → eftermiddag blokeret → kun online (teal) → ingen. Første klik = hel dag blokeret
  • Admin kalender: teal farve + 📹-ikon for online-dage; legende opdateret med korrekt rækkefølge
  • Terapeutportal kalender: samme farve/ikon/tooltip som admin
  • `TB_Therapist::add_blocked_date()`: `'online'` tilføjet til whitelist
  • `TB_Therapist::get_available_slots()`: `online`-type behandles som ingen blokerig af slots (ikke `full`)
  • `TB_Ajax::get_available_dates()`: returnerer nu `{date, online_only}` objekter i stedet for strenge; forhåndsindlæser blokerede datoer i ét DB-kald
  • `TB_Ajax::get_all_services()` og `get_services()`: filtrerer til `delivery_type IN (online, both)` når `online_only=1` sendes med
  • `booking.js`: håndterer nyt dato-format; online-only dage får teal farve i klientkalender; vælges en online-only dag med en fysisk ydelse aktiv, ryddes ydelsesvalget og klienten sendes til ydelseslisten med kun online-ydelser
v1.71.56 Juli 2026
▼
  • **Sikkerhed:** Google- og Microsoft OAuth-tokens (`google_access_token`, `google_refresh_token`, `ms_access_token`, `ms_refresh_token`) krypteres nu (AES-256-CBC) før de gemmes i databasen, i stedet for klartekst
  • Ny delt klasse `TB_Crypto` (`includes/class-tb-crypto.php`) — udtrukket fra `TB_CalDAV::encrypt_password()`/`decrypt_password()`-mønsteret, som nu delegerer til den (uændret nøgleafledning/format — 100% bagudkompatibel med eksisterende CalDAV-adgangskoder og portal-session-cookies)
  • Bagudkompatibel migrering: `TB_Crypto::decrypt_token()` falder tilbage til rå værdi hvis dekryptering fejler (dvs. eksisterende ukrypterede tokens fra før v1.71.56) — tokens re-krypteres automatisk ved næste token-fornyelse
  • Rørte filer: `class-tb-google-calendar.php`, `class-tb-microsoft-calendar.php`, `class-tb-relay-client.php` (alle 4 skrivepunkter + alle brugssteder af tokens)
  • Baggrund: Del af Google OAuth-verifikationsproces — Google kræver eksplicit dokumenterede databeskyttelsesmekanismer for følsomme data (adgangstokens) i privatlivspolitikken
v1.71.55 Juni 2026
▼
  • Ydelser: Skjult ydelse med dybt link ("semi-aktiv") — ydelse med `Vis på hjemmesiden` slået fra vises ikke i `[therapist_services]` oversigten, men kan bookes via dybt link (`?service_id=X`)
  • Admin ydelsesliste: "Vis på web"-kolonne viser nu amber "Skjult" badge (i stedet for blot –) med tooltip der forklarer konceptet; dybt link-kolonnen får en gul fremhævningsboks med teksten "Del dette link for at booke ydelsen"
  • `get_all_services` AJAX: Skjult ydelse inkluderes alligevel i svaret når `preselect_id` matcher — booking-formularen kan dermed preselecere og booke skjulte ydelser via dybt link
  • `booking.js`: Sender `preselect_id` med i `tb_get_all_services`-kaldet ved deep link preselection
v1.71.54 Juni 2026
▼
  • Terapeutportal: "Portal-side slug" tekstfelt erstattet med dropdown (wp_dropdown_pages) — konsistent med øvrige side-vælgere i indstillinger
  • Gem af dropdown opdaterer tb_portal_page_id direkte med det valgte side-ID
v1.71.53 Juni 2026
▼
  • Terapeutportal: `ensure_portal_page()` overskriver ikke længere `tb_portal_page_id` hvis den allerede peger på en gyldig publiceret side
  • Terapeutportal: Gem af "Portal-side slug" i admin opdaterer nu `tb_portal_page_id` med det samme så redirect virker uden manuel SQL
v1.71.52 Juni 2026
▼
  • Terapeutportal: Portal-sidens slug er nu konfigurerbar via felt i TB core admin → Indstillinger → Generelt
v1.71.51 Juni 2026
▼
  • Terapeutportal: Magic login-link funktion tilsæjet direkte i login-formen
v1.71.50 Juni 2026
▼
  • Sikkerhed A1: `cancel_booking` AJAX-handler manglede CSRF-beskyttelse — tilsæt `check_ajax_referer('tb_booking_nonce')`
  • Sikkerhed A2: Alle 12 muterende terapeutportal AJAX-handlers manglede CSRF-beskyttelse — ny `verify_csrf()` metode baseret på session-token (ikke WP-nonce, da terapeuter ikke er WP-brugere)
  • Sikkerhed B2: `ajax_portal_create_booking` respekterede ikke `tb_can_book`-filteret — Shell kan nu blokere manuel portal-booking
v1.71.48 Juni 2026
▼
  • Fix: `tb_calendar_should_create_event`-filteret i v1.71.47 returnerede tidlig `return` og sprang dermed `tb_calendar_create_buffer_events()` over — oprydnings- og forberedelsestid kom ikke med i kalenderen. Rettet: filteret wrapper nu kun hoved-event-oprettelsen; buffer-events oprettes altid uanset filterets resultat
v1.71.47 Juni 2026
▼
  • Ny: `apply_filters('tb_calendar_should_create_event', true, $booking, $therapist)` øverst i `tb_calendar_create_event()` — Shell kan returnere false for at forhindre duplikat kalenderaftale. Brugt i SaaS når Teams er provider: `TB_Teams::create_meeting()` opretter allerede en kalenderaftale via `/me/events`, så `TB_MicrosoftCalendar::create_event()` skal springes over
  • Ny: `do_action('tb_calendar_after_delete', $booking, $therapist)` i `tb_calendar_delete_event()` — Shell kan reagere på sletning og rydde op i Teams-mødet (`teams_meeting_id`) separat. Uden dette hook slettede aflysning kun kalenderaftalen fra `ms_event_id` men ikke Teams-mødet
  • Begge hooks er neutrale — no-op for plugin-kunder uden lyttere
v1.71.46 Juni 2026
▼
  • Ny: `apply_filters('tb_ms_refresh_token', null, $therapist)` i `TB_MicrosoftCalendar::get_valid_token()` — Shell kan kortSlutte relay HTTP-kaldet ved at returnere et token direkte. Bruges i SaaS for at undgå loopback: `TBR_Microsoft::do_token_refresh($therapist)` kaldes som PHP-funktion i stedet for HTTP til bookbookbook.dk/wp-json/tb-relay/v1/ms/refresh-token. Neutral hook — null = ingen lytter, eksisterende kode kører uændret
v1.71.45 Juni 2026
▼
  • Ny: `apply_filters('tb_teams_is_configured', $result)` i `TB_Teams::is_configured()` — Shell kan overstyre det globale konfigurationstjek. Nødvendigt i SaaS fordi `TB_MicrosoftCalendar::is_configured()` tjekker relay-URL via `TB_Relay_Client::is_enabled()` som returnerer `false` på bookbookbook.dk (relay er dette site, ikke en ekstern URL), hvilket fejlagtigt fik `is_configured()` til at returnere `false` selv om terapeuten har gyldige tokens. Neutral hook — no-op for plugin-kunder uden lyttere
v1.71.44 Juni 2026
▼
  • Udvidet: `TB_Zoom::get_credentials($booking = null)` sender nu valgfrit `$booking` som 2. arg til `tb_zoom_credentials`-filter (var 1 arg) — Shell kan dermed slå company_id op fra `$booking->company_id` i stedet for session, hvilket er nødvendigt under klient-AJAX-booking-flow
  • Udvidet: `TB_Zoom::create_meeting()` sender `$booking` til `get_credentials()` og tjekker credentials inline (ikke via `is_configured()`) — ensures per-company credentials bruges korrekt
  • Udvidet: `TB_Zoom::get_token()` modtager nu `$creds`-array eksplicit i stedet for at hente dem selv — undgår dobbelt filter-kald pr. request
  • `test_connection()` og `delete_meeting()` uændret i adfærd (kalder `get_credentials()` uden booking — virker fra admin/portal-session)
v1.71.43 Juni 2026
▼
  • Ny: `apply_filters('tb_zoom_credentials', $creds)` i `TB_Zoom::get_credentials()` — Shell kan injicere per-company Zoom-credentials (account_id, client_id, client_secret) så SaaS-klinikker bruger deres egne Zoom-apps
  • Ny: `apply_filters('tb_online_meeting_provider', $provider, $booking, $therapist)` i `tb_maybe_create_online_meeting()` — Shell kan overstyre den globale `online_meeting_provider` pr. virksomhed
  • Ny: `apply_filters('tb_zoom_license_ok', $bool, $booking)` — Shell kan bypass klassisk licenstjek for SaaS
  • Ny: `apply_filters('tb_teams_license_ok', $bool, $booking)` — Shell kan bypass klassisk licenstjek for SaaS
  • Teknisk: Zoom token-cache er nu per-credentials (md5 af account_id) så SaaS-klinikker med egne credentials ikke deler token
  • Alle 4 hooks er neutrale — no-op for plugin-kunder uden lyttere
v1.71.39 Juni 2026
▼
  • Ny: `do_action('tb_payment_confirmed', $order_id, $payment_method)` — fyres på de steder hvor en betaling RENT FAKTISK er gennemført (penge modtaget, ikke kun reserveret): MobilePay booking-flow (`payment_return`), MobilePay gavekort/forløb-flow, MobilePay webhook, Stripe `process_confirmed_payment()` (booking, deposit og fuld betaling), Stripe gavekort-aktivering, Stripe forløb-aktivering
  • MobilePay: ny `$tbs_money_captured`-sporing skelner mellem "kun reserveret" (capture-tilstand "Kun reservation") og "rent faktisk trukket" — hooket fyres KUN ved faktisk capture, ikke ved reservation alene
  • Formål: lader Shell bygge en selvstændig betalings-/udbetalingslogbog uafhængig af booking-data, uden at skulle gætte retroaktivt hvilke betalinger der reelt blev gennemført
  • Neutral hook — no-op for plugin-kunder uden lyttere
v1.71.38 Juni 2026
▼
  • Ny: `do_action('tb_mobilepay_payment_initiated', $order_id, $booking_or_data, $settings)` i `TB_MobilePay::create_payment()` — fyres efter order_id er kendt, lige før MobilePay-API-kaldet
  • Ny: `do_action('tb_stripe_payment_initiated', $booking_id, $order_id, $booking_or_data, $secret)` i `TB_Stripe::create_checkout_session()` — fyres lige før Stripe Checkout-API-kaldet
  • Formål: lader Shell stemple hvilket nøglesæt (platform/klinikkens egne) der reelt blev brugt til den enkelte betaling, PÅ betalingstidspunktet — uden dette var Shell nødt til at udlede det retroaktivt af klinikkens nuværende indstilling, hvilket gav forkerte tal i Betalingsoverblik hvis klinikken havde skiftet model siden
  • Begge hooks er neutrale (no-op) for plugin-kunder uden lyttere
v1.71.37 Juni 2026
▼
  • Forenkling: fjernet 'delayed' (3-dages cron) capture-tilstand igen — viste sig at være baseret på en misforståelse af Vipps' udbetalingsfrist (3 arbejdsdage fra capture til bankkonto), ikke en forretningsregel om hvornår selve capture skal ske
  • Fjernet: `tb_mobilepay_captures`-tabel, `schedule_capture()`, `run_scheduled_capture()`, `release_scheduled_capture()`, `on_booking_cancelled()`-hook
  • Capture-tilstand er nu kun to muligheder: "Med det samme" (standard) og "Kun reservation" (genskaber den oprindelige adfærd — manuel capture i Vipps-portalen, gebyrfri test)
v1.71.36 Juni 2026
▼
  • Ny: Capture-tilstand for MobilePay (TB core admin → Betaling): "Med det samme" (standard, uændret adfærd), "Forsinket" (3 dage via cron) og "Kun reservation" (gebyrfri test — captures aldrig automatisk)
  • Ny: `TB_MobilePay::schedule_capture()` + `run_scheduled_capture()` — planlægger capture via `wp_schedule_single_event()`, sporet i ny tabel `tb_mobilepay_captures`
  • Ny: `TB_MobilePay::release_scheduled_capture()` — frigiver automatisk en planlagt capture (og kalder Vipps' cancel-endpoint) når booking annulleres via eksisterende `tb_booking_cancelled`-hook
  • Ny: `TB_MobilePay::cancel_payment()` — eksplicit annullering/frigivelse af en reservation hos Vipps
  • Ny: filtre `tb_mobilepay_capture_mode` og `tb_mobilepay_capture_delay_days` — neutrale for standalone-kunder, lader tb-saas styre capture-tilstand per klinik (superadmin + klinikportal)
  • Ny tabel: `tb_mobilepay_captures` (order_id, context_type/id, amount_minor, status, scheduled_at, captured_at)
v1.71.35 Juni 2026
▼
  • 🔴 KRITISK FIX: MobilePay-betalinger blev reserveret men ALDRIG captured (`capturedAmount=0` i produktionslog) — pengene blev ikke trukket fra kunden
  • Ny: `TB_MobilePay::capture_payment($order_id, $amount_minor)` — eksplicit capture via `POST /epayment/v1/payments/{reference}/capture`
  • Fix: `handle_payment_return()` capturer nu betalingen ved `AUTHORIZED`-status før booking/gavekort/forløb markeres betalt — depositum capturer kun depositum-beløbet, fuld betaling capturer fuld pris
  • Fix: gavekort/forløb-flowet (uden `$booking`-objekt) slår beløb op via ny `lookup_capture_amount()` (price_paid fra tb_giftcards/tb_courses) og capturer korrekt
  • Sikkerhed: hvis capture fejler markeres betalingen IKKE som gennemført — undgår falsk bekræftelse til kunden
v1.71.34 Juni 2026
▼
  • Ny: `apply_filters('tb_mobilepay_settings', ...)` i `TB_MobilePay::s()` — Shell kan injicere per-klinik MobilePay-nøgler
v1.71.33 Juni 2026
▼
  • Fix: `booking_form()` kalder nu `apply_filters('tb_payment_settings', ...)` — allow_card/allow_mobilepay virker korrekt i SaaS
v1.71.32 Juni 2026
▼
  • Ny: `do_action('tb_booking_cancelled', $booking)` i `send_cancellation()` — Shell kan sende notifikation til terapeut og klinik ved klient-aflysning
v1.71.31 Juni 2026
▼
  • Ny: `apply_filters('tb_admin_notification_email', $email, $booking)` i `send_admin_notification()` — Shell kan override modtager til klinikkens email
v1.71.30 Juni 2026
▼
  • Fix: `TB_Email::wrap()` henter nu primærfarve fra `get_option('tb_booking_design')['accent']` — emails følger klinikkens valgte tema i SaaS
v1.71.29 Juni 2026
▼
  • Ny: 4 hooks til SaaS terapeutportal-integration i `class-tb-therapist-portal.php`:
v1.71.28 Juni 2026
▼
  • Fix: Service-dot farve — fjernet inline `style="background:'+svc.color+'"` fra `booking.js`; farve sættes nu via CSS-klasse
v1.71.27 Juni 2026
▼
  • Fix (utilstrækkelig): Service-dot CSS-fallback — virkede ikke, se v1.71.28
v1.71.26 Juni 2026
▼
  • Ny: `.tb-lang-switcher` CSS-klasser i `booking.css` — inline styles fjernet fra `class-tb-shortcodes.php`
  • Ny: `.tbs-booking-page-title { display:none }` override-punkt for tb-saas
v1.71.25 Juni 2026
▼
  • Intern refaktor (detaljer ikke dokumenteret)
v1.71.24 Juni 2026
▼
  • Intern refaktor (detaljer ikke dokumenteret)
v1.71.23 Juni 2026
▼
  • Ny: `apply_filters('tb_payment_settings', $settings, null)` i `enqueue()` — Shell kan injicere allow_card/allow_mobilepay
  • Ny: `apply_filters('tb_stripe_secret_key', $key)` i `class-tb-stripe.php` — Shell kan injicere per-klinik Stripe SK
  • Ny: `apply_filters('tb_stripe_connect_params', [], $data)` — stub til fremtidig Stripe Connect
  • Ny: Stripe-betalingssti for `purchase_giftcard()` og `purchase_course()` i `class-tb-ajax.php`
v1.71.22 Juni 2026
▼
  • Ny: `invoice_token()` + `invoice_public_url()` i `class-tb-accounting.php` — offentlig faktura-URL
  • Ny: `maybe_serve_public_invoice()` via `template_redirect` i `class-tb-admin-accounting.php`
v1.71.21 Maj 2026
▼
  • Ny: Bekræftelsesmail viser nu gavekort-information ved gavekortbetaling
  • Ændret: class-tb-ajax.php gemmer gc_info (type, discount, remaining) på
  • Ændret: class-tb-email.php bygger $gc_row ud fra booking->gc_amount_used,
v1.71.20 Maj 2026
▼
  • Refaktor: class-tb-admin-settings.php splittet fra 1.290 linjer til 192 linjer
  • Oprettet admin/settings/ mappe med 7 template-filer (tab-generelt, tab-gavekort,
  • Alle filer under 600 linjer — ingen logik ændret, kun strukturel opdeling
  • tb_dc() global funktion erstattet med public static TB_Admin_Settings::tb_dc()
v1.71.12 Maj 2026
▼
  • Oprettet config/constants.php — 9 konfigurérbare konstanter samlet ét sted
  • therapist-booking.php loader config/constants.php som allerførste include
  • Magic numbers erstattet med navngivne konstanter i 15 filer
v1.71.10 Maj 2026
▼
  • Fix: Booking-portal krævede to klik for at skifte sprog — rod-aarsag var at
v1.71.09 Maj 2026
▼
  • Refaktorering: Erstattet plugin_locale-filter med switch_to_locale() paa template_redirect
v1.71.08 Maj 2026
▼
  • Fix: Sprogswitcher i terapeut-portal bruger nu ?lang=xx URL-parameter ved reload
  • Fix: Login-redirect inkluderer ?lang=xx naar terapeutens sprog afviger fra WP site-sproget
  • Fix: Booking-formularens sproglinks brugte allerede ?lang= korrekt — ingen aendring der
v1.71.07 Maj 2026
▼
  • Fix: Bookingportal viser nu korrekt WP site-sprog som standard (ikke altid engelsk)
  • Fix: Sprogskift virker nu uanset om WP-admin er sat til dansk eller engelsk
  • Refaktorering: Erstattet upaalidelig unload/reload paa init med plugin_locale-filter
  • Ny: tb_match_locale() helper — faelles locale-matching for filter, cookie og GET-param
  • Ny: tb_set_locale_cookie_from_url() — saetter tb_locale-cookie naar ?lang= bruges i URL
v1.71.06 Maj 2026
▼
  • Fix: Plugin-sproget følger nu altid WP site-sproget (Indstillinger → Generelt) som standard — ingen konflikt med WP-admin sprogvalg
  • Fix: Klienter og terapeuter kan nu altid skifte sprog uanset hvad WP-admin sproget er sat til
  • Ny: Forenklet sprog-arkitektur — tb_locale-cookie deles af booking-portal og terapeut-admin; ?lang=xx URL-param sætter cookie
  • Fjernet: Plugin-sprog indstilling (frontend_locale) fra admin-indstillinger — WP site-sproget er nu altid standard
  • Fjernet: plugin_locale og load_textdomain_mofile filtere — erstattet af simpel unload/reload på init priority 1
v1.71.05 Maj 2026
▼
  • Fix: Kritisk class-name-fejl (TB_TherapistPortal -> TB_Therapist_Portal) i tb_maybe_reload_textdomain() og tb_filter_plugin_locale() — aarsag til at terapeut-portalens sprogskaelger ikke slog igennem efter reload
  • Fix: Plugin-locale-filter koerte aldrig get_session_locale() da class_exists-tjekket altid returnerede false
  • Ny: Dedikeret tb_therapist_locale cookie saettes ved login, locale-skift og ryddes ved logout — giver hurtig locale-detection paa plugins_loaded uden DB-kald
  • Forbedret: tb_filter_plugin_locale() bruger nu cookie som primaer kilde, DB-opslag som fallback for aeldre sessioner
v1.71.05 Maj 2026
▼
  • Fix: Kritisk class-name-fejl ('TB_TherapistPortal' → 'TB_Therapist_Portal') i tb_maybe_reload_textdomain() og tb_filter_plugin_locale() — årsag til at terapeut-portalens sprogvælger ikke slog igennem efter reload
  • Fix: Plugin-locale-filter kørte aldrig get_session_locale() da class_exists-tjekket altid returnerede false
  • Ny: Dedikeret 'tb_therapist_locale' cookie sættes ved login, locale-skift og ryddes ved logout — giver hurtig locale-detection på plugins_loaded uden DB-kald
  • Forbedret: tb_filter_plugin_locale() bruger nu cookie som primær kilde, DB-opslag som fallback for ældre sessioner
v1.71.03 April 2026
▼
  • Tilføjet 1 ny string (DB-fejl: %s)
  • POT regenereret: 1198 strings (op fra 1197 i v1.71.02)
  • 100% dækning i en_US.mo
v1.71.02 April 2026
▼
  • Klik på et sprog tilføjer `?lang=xx` til URL'en og reloader siden
  • Bruger den eksisterende `tb_get_frontend_locale()` URL-prioritering
  • Vises kun hvis der er mere end ét sprog defineret i `tb_get_supported_locales()`
  • Sprog persisterer i URL'en (kan deles eller bookmarkes)
  • Ny `locale VARCHAR(10) DEFAULT NULL` kolonne i `tb_therapists` (auto-migreret via dbDelta)
  • Ny AJAX-handler `tb_therapist_save_locale` der validerer og gemmer
  • `TB_TherapistPortal::get_session_locale()` — public helper der returnerer
  • `get_session_therapist()`: ændret fra `private` til `public static` så
  • Tilføjet `get_session_locale()` som lightweight alternativ uden side-effekter
  • `ajax_save_locale()`: validerer mod `tb_get_supported_locales()` før save
  • JS `portal-lang-switcher` change-event: kalder AJAX og reloader på success
  • Tilføjet 3 nye strings (Adgangskoderne er ikke ens, Profil gemt ✓, Ugyldigt sprog)
  • POT regenereret: 1197 strings (op fra 1194 i v1.71.01)
  • 100% dækning i en_US.mo
v1.71.01 April 2026
▼
  • Email/password felter med labels og placeholders
  • "Log ind"-knap
  • AJAX-fejlmeddelelser ("Forkert email eller adgangskode.", osv.)
  • "Logget ind som [navn]" + Log ud-knap
  • 7 fanenavne: Kommende bookinger, Historik, Tilgængelighed, Ydelser,
  • Hamburger-menu for mobil
  • Aftaletæller med pluralis ("3 appointments" / "1 appointment")
  • "Opret booking"-knap + komplet ny-booking formular (alle 9 felter)
  • Ydelse-vælger (med "X min — Y kr." format)
  • Status dropdown (Ubetalt/Betalt/Afventer)
  • Bookings-tabel headers (Klient, Dato & tid, Ydelse, Betaling, Status)
  • Status-badges (Afventer/Bekræftet/Gennemført/Aflyst)
  • Action-knapper (Rediger, Slet, Start Zoom, Start Teams)
  • Bookings-tæller med pluralis
  • Måneds-grupperede entries
  • Status-badges
  • "Ugentlige tidsvinduer" sektion + tilføj/fjern rækker
  • Ugedage (Mandag–Søndag) som oversatte strings
  • "Bloker specifikke datoer" kalender
  • Legend (Formiddag, Eftermiddag, Hel dag, Ingen)
  • Toggle-rækker pr. ydelse
  • Pris/Tid felter med kr. og min. labels
  • Alle felter (Navn, Email, Telefon, Foto URL, Biografi)
  • Adgangskode-felter med placeholders
  • "Gem profil"-knap
  • CalDAV-sektion med to-vejs sync forklaring
  • iCal-sektion med abonnement-URL og Google Calendar-vejledning
  • Test forbindelse / Test iCal-URL knapper
  • Opbevaringspolitik info-boks
  • Klient-tæller med pluralis
  • Status-badges (Klar til sletning, Om X dage, Aktiv)
  • Forlæng/Slet data knapper
  • Alle 12 felter med labels
  • Status dropdown
  • "Send ændringsmail til klienten" checkbox
  • "Forlæng opbevaring" + alle felter
  • 60 wp_send_json_error/success-strings auto-wrappet
  • 4 batch_replace.json filer kørt sekventielt
  • Alle ugedage (Mandag–Søndag + Man–Søn) tilføjet med korrekt en_US mapping
  • Pluralis: `%d aftale/aftaler`, `%d booking/bookinger`, `%d klient/klienter`,
  • Tilføjet 194 nye strings til en_US mapping
  • POT regenereret: 1194 strings (op fra 1089 i v1.71.00)
  • 100% dækning i en_US.mo
v1.71.00 April 2026
▼
  • WordPress' admin-bar, dashboard widgets og andre plugins følger fortsat
  • Kun pluginnets egne tekster (knapper, faner, formularer mv.) styres af
  • Settings-feltet er omdøbt fra "Sprog på bookingformular" til "Plugin-sprog"
  • Beskrivelsen er opdateret til at gøre det klart at indstillingen styrer
  • Note tilføjet om at WordPress' egen admin følger brugerens profilsprog
  • Settings-key er stadig `frontend_locale` (ikke ændret) for at bevare
  • Tidligere callere af `tb_filter_frontend_locale` (ingen i koden) er ikke
  • Tilføjet 4 nye strings til en_US mapping
  • POT regenereret: 1089 strings (samme antal som v1.70.05 — gamle strings
  • 100% dækning i en_US.mo
v1.70.05 April 2026
▼
  • Kortets ydre baggrund → Card outer background
  • Header, sektioner → Header, sections
  • Brødtekst, labels → Body text, labels
  • Sekundær tekst, hjælpetekst → Secondary text, help text
  • Overskrifter og fremhævet tekst → Headings and emphasized text
  • Terapeut-navn, highlights → Therapist name, highlights
  • Knapper, links, aktive elementer → Buttons, links, active elements
  • Hover-effekt på knapper → Hover effect on buttons
  • Rammer på kort og separatorer → Borders on cards and separators
  • Tilføjet 9 nye strings til en_US mapping
  • POT regenereret: 1089 strings (op fra 1080 i v1.70.04)
  • 100% dækning i en_US.mo
v1.70.04 April 2026
▼
  • 3 region-overskrifter (Europa, Amerika, Asien / Oceanien) wrapped i `__()`
  • 14 europæiske by-labels oversat (København / Danmark, Berlin / Tyskland osv.)
  • Hele timezone-beskrivelsen ("Tidszonen bruges til...", "Sommertid/vintertid...",
  • Hele beskrivelsen ovenover Account ID/Client ID/Client Secret-felterne
  • Brugte `printf()` med placeholders for at bevare HTML-formatering
  • Account ID placeholder ("fx aBcDeFgHiJ" → "e.g. aBcDeFgHiJ")
  • Hele description-blokken ("Fra Stripe Dashboard → Developers → Webhooks...",
  • Brugte `printf()` med `<code>`-tags for at bevare formattering
  • Stripe Secret Key placeholder ("sk_live_… eller sk_test_…")
  • `TB_License::locked_notice()` blev gjort i18n-aware
  • Alle 4 callers opdateret med `__()` på feature-labels og plan-navne:
  • "Administrér licens" link → "Manage license"
  • "Google Font URL" og description "Hent link fra fonts.google.com"
  • "Font-navn" og description "Præcist CSS font-family navn fra Google Fonts"
  • "Forhåndsvisning"-overskrift
  • Live preview tekster (Klinik, Tilgængelig, Individuelt sessionsforløb,
  • "Gem design"-knap
  • DM Sans hint ("DM Sans er standardfonten for Moderne-temaerne...")
  • 13 "Nulstil"-knapper på alle farve-felter
  • Menupunkt-label "PHP Error Log" wrapped i `__()`
  • Side-overskrift
  • Filter-input placeholder ("Filtrer (fx [TB MS], [TB Zoom])")
  • "linjer"-suffiks i dropdown (100/200/500)
  • Alle UI-knapper (Hent log, Opdater, Auto (5 sek), Kun TB-linjer, Ryd log)
  • Initial besked "Klik 'Hent log' for at indlæse..."
  • JS-strings (Henter..., Ingen linjer matcher filteret, Netværksfejl)
  • Confirm-dialog "Ryd PHP error log?"
  • Backend AJAX-fejlmeddelelser (PHP error log fil ikke fundet, Kan ikke åbne
  • License `locked_notice` bruger nu HTML-bevarende `printf()` med `%1$s`/`%2$s`
  • JS-strings i error log siden bruger `wp_json_encode( __() )`-pattern for
  • Tilføjet 63 nye strings til en_US mapping
  • POT regenereret: 1080 strings (op fra 1024 i v1.70.03)
  • 100% dækning i en_US.mo
v1.70.03 April 2026
▼
  • Tabel-overskrifter for Sold (Kode, Klient, Forløb, Sessioner, Status, Udløber)
  • Tabel-overskrifter for Products (Navn, Ydelse, Sessioner, Pris, Solgt, Aktiv,
  • Status-badges (Aktiv, Brugt, Udløbet, Afventer, Annulleret)
  • Tom-tilstande, "stk.", "kr.", confirm-dialog ved sletning
  • Rediger/Slet-knapper
  • Side-overskrift "Rabatkoder" + "Opret ny rabatkode"-knap
  • Notice-meddelelser (Rabatkode gemt!, Rabatkode slettet., Tilbage til oversigt)
  • Hele opret/rediger-formularen:
  • Listetabel (Kode, Beskrivelse, Rabat, Gælder for, Udløber, Anvendelser, Status,
  • Status-badges (Aktiv, Inaktiv, Udløbet, Opbrugt)
  • Confirm-dialog ved sletning med kode-navn
  • AJAX-handler "Adgang nægtet."-fejl
  • Side-overskrift + "Eksporter til Excel (CSV)"-knap
  • Filterbjælke (Fra dato, Til dato, Terapeut, Ydelse, Betalingsstatus, Vis-knap)
  • Genvejsknapper (Denne måned, Forrige måned, Dette kvartal, Dette år)
  • 4 KPI-kort (Total omsætning, Antal bookinger, Gns. pr. booking, Ubetalte i perioden)
  • 4 grafer:
  • Bookingdetaljer-tabel (Dato, Klient, Terapeut, Ydelse, Betalingsmetode, Pris, Faktura)
  • Total-række
  • "Opret faktura for denne booking"-tooltip
  • "🧾 Fakturaer" + "🎨 Design"
  • "Ny faktura"-knap
  • Søgefelt + status-filter
  • Tabel-overskrifter (Fakturanr., Klient, Dato, Frist, Total, Status, Handlinger)
  • Status-badges (Kladde/Sendt/Betalt)
  • Action-knapper (Rediger, Vis/udskriv, Send til %s, Markér som betalt, Slet)
  • JS confirm-dialoger og success-meddelelser
  • Sidetitel "Ny faktura" / "Rediger faktura X"
  • "Faktureres til"-sektion (Navn, Email, Adresse, CVR)
  • "Linjeposter"-sektion med katalog-vælger og fritekst
  • Tabel-overskrifter (Beskrivelse, Antal, Stykpris, Moms, Beløb)
  • Momsfrit-option, "Tilføj fritekst-linje"-knap
  • Totaler (Subtotal, Moms, Total)
  • "Bemærkninger"-sektion
  • Højre kolonne: Status, "Gem faktura"-knap, Fakturadata, Udsteder
  • Alle JS-strings (Gemmer…, Gemt!, Tilføj mindst én linjepost, osv.)
  • "🎨 Farver & Logo" sektion (Primær farve, Tekst på farvet bg, Accent-tekstfarve, Logo)
  • "🏦 Betalingsoplysninger" sektion (Reg.nr., Kontonr., IBAN, SWIFT/BIC, Fritekst)
  • Live preview ("👁 Forhåndsvisning") med FAKTURA-header, Beskrivelse/Beløb, Total
  • Logo-upload via wp.media (Vælg logo, Brug dette billede, Fjern)
  • "Gem indstillinger"-knap
  • Locale-aware: pluralis bruger nu `_n()` (rabatkode-anvendelser, course-sessioner,
  • "kr." valuta-suffiks oversat overalt → "DKK"
  • Måneds-forkortelser i regnskabsgraf bruger nu `__()` så engelsk locale viser
  • JS-strings i alle 3 faner bruger nu `wp_json_encode( __() )`-pattern for korrekt
  • Tilføjet 162 nye strings til en_US mapping
  • POT regenereret: 1024 strings (op fra 880 i v1.70.02)
  • 100% dækning i en_US.mo
  • `class-tb-accounting.php → render_invoice_html()` (selve faktura-print-HTML
  • CSV-eksport-headers (`ajax_export_csv()`)
  • Faktura-email subject og body (`send_invoice_email()`)
  • Disse vises ikke i admin-UI'en — kun når faktura sendes til klient eller printes,
v1.70.02 April 2026
▼
  • VAT-nummer beskrivelse: "Bruges automatisk som CVR på fakturaer..."
  • Felt-label "Kalenderfarve"
  • "Aktiv" checkbox-overskrift og dens label "Vis terapeuten i bookingsystemet"
  • Portal-adgangskode beskrivelse "Terapeuten logger ind med:"
  • Tabel-overskrifter (Navn, Varighed, Pris, Min. varsel, Buffer, Aktiv,
  • Tabel-celle indhold ("min.", "kr.", "t.")
  • Tooltip-tekster (Forberedelse, Oprydning, "Vises via [therapist_services]")
  • Terapeut-tæller med pluralis ("X terapeut" / "X terapeuter")
  • Deeplink kopier-knap og hjælpe-tekster
  • Rediger/Slet-knapper og confirm-dialog
  • Justering (Venstrejusteret/Centreret) + beskrivelse
  • Sektion-overskrifter (Kortets farver, Tekst, Tid og behandlingstype,
  • Alle 16 farve-felt-labels (Baggrundsfarve, Stregfarve, Overskrift, m.fl.)
  • 16 "Nulstil" knapper på begge faner
  • "Gem design" knap
  • Tabel-overskrifter (Navn, Type, Salgspris, Solgt, Aktiv, Handlinger)
  • Tabel-celler ("Beløb: X kr.", "Ydelse: X")
  • Tom-tilstand "Ingen gavekort-produkter endnu. Opret det første."
  • Rediger/Slet-knapper
  • Hele "Rediger gavekort" formularen (Modtagers navn, email, Købers navn,
  • Hele "Udsted gavekort manuelt" formularen
  • Tabel-overskrifter (Kode, Modtager/Køber, Produkt, Status, Udløber, Udstedt)
  • Status-badges (Aktiv, Afventer, Brugt, Udløbet, Annulleret)
  • Side-overskrift og indledning
  • 3 design-temaer (Elegant, Minimal, Varm)
  • Farve-vælgere (Baggrund, Accent, Tekst)
  • Indhold-formular (Overskrift, Undertekst, Personlig besked, Kode-label)
  • Standardværdier ("Et gavekort til dig", "Med kærlig hilsen", "Din gavekortkode")
  • Logo / klinikoplysninger sektion
  • Produkt/Værdi sektion
  • Send test-email sektion
  • "Gem som standard-design" sektion
  • Live preview label og dynamiske strings
  • "Tjek hvad der er gemt i databasen" debugging-knap
  • Værdiboks tekster ("Gavekortsværdi", "Gælder for", "— vises automatisk —")
  • JS-genererede strings via wp_json_encode( __() ) for korrekt escape
  • giftcard-designer.php fik ny i18n-objekt-pattern: `var i18n = {...}` med
  • Locale-aware date/number formatting: bruger nu `determine_locale()` i JS
  • Pluralis-strings for terapeut-tæller bruger nu `_n()` for korrekt grammatik
  • Tilføjet 134 nye strings til en_US mapping
  • POT regenereret: 880 strings (op fra 758 i v1.70.01)
  • 100% dækning i en_US.mo
v1.70.01 April 2026
▼
  • Status-badge ("Aktiv — sender 26 timer før aftale" / "Deaktiveret")
  • 4 statistik-bokse (Sendte påmindelser, Fejlede, Test-afsendelser, I alt i log)
  • Indstillinger-formular (Aktivér påmindelser, Tilpasset intro-tekst)
  • Test-afsendelse tabel (Dato/Tid, Klient, Reminder sendt, Handling, Send test, Nulstil)
  • Afsendelseslog (Sendt, Type, Klient, Email, Aftale, Terapeut, Status)
  • Status-badges (✓ Sendt / ✗ Fejl) og type-badges (Test / Auto)
  • JS-strings i confirm-dialoger og knap-labels
  • Sideoverskrift "Terapeuter"
  • "Tilføj ny" knap (både normal og deaktiveret-variant ved licens-grænse)
  • Licens-grænse besked "— Terapeut-grænse nået (X/Y). Opgradér licens"
  • Tom-tilstand "Ingen terapeuter endnu. Tilføj den første."
  • Tabel-overskrifter (Navn, Email, Telefon, Ydelser, Aktiv, Handlinger)
  • Status-badges (✔ Aktiv / ✘ Inaktiv)
  • "Ingen ydelser koblet" advarsel
  • Tilgængeligheds-sektion (description, "Fjern" knap, "Tilføj tidsvindue")
  • Ydelser-tabel headers (Aktiv, Ydelse, Pris, Varighed)
  • "Standard: X min. • Y kr." service-info
  • Blokerede datoer-kalender (ugedage Man-Søn, legend-tekster: Formiddag/Eftermiddag/Hel dag blokeret)
  • Klik-instruktion og kalender-vejledning
  • Kalendertype-vælger (CalDAV/Google/Microsoft beskrivelser)
  • CalDAV-formular (Kalender-URL, Brugernavn, Test forbindelse, Aktivitetslog,
  • iCal-abonnement sektion (URL-felt, Google Calendar/Outlook/iCloud guide-tekster)
  • "Test iCal-URL" knap
  • Gem terapeut / Annuller knapper
  • "Ingen aktivitet endnu" log-tom-tilstand
  • Tilføjet 87 nye strings til en_US mapping
  • POT regenereret: 758 strings (op fra 683 i v1.70.00)
  • 100% dækning i en_US.mo
v1.70.00 April 2026
▼
  • Alle menupunkter (Bookinger, Terapeuter, Ydelseskatalog, Gavekort, Forløb,
  • Booking-listen: tabeloverskrifter, filtre, status-badges, modal til opret/rediger
  • Terapeut-form: Grundoplysninger, Portal-adgangskode, CalDAV-felter,
  • Indstillinger: alle 7 faner (Generelt, Gavekort e-mail, Kalender, Online møder,
  • Design-fane: alle 5 tema-labels (Mørkt/Lyst/Neutralt/Moderne Mørkt/Moderne Lyst),
  • Licens-fane: 15 feature-labels
  • Ydelseskatalog (page_services): hele opret/rediger-formularen, faner,
  • Gavekort (page_giftcards): produkter, solgte gavekort, design-fane
  • Forløb (page_courses): produkter, solgte forløb, design-fane
  • GDPR-side: tabel-overskrifter, status-badges, Forlæng/Slet-knapper, dialoger
  • Versionslog: aktuel version, installationshistorik, CHANGELOG.md visning
  • Online møder fane: Zoom (Server-to-Server OAuth), Teams test-forbindelse
  • Betaling fane: MobilePay (Vipps), Stripe konfiguration
  • TB_Admin.i18n object udvidet med 50+ nøgler
  • Alle 9 confirm-dialoger oversat (slet booking, frakobl Google/MS, ryd logs, GDPR)
  • 35 forekomster af hyppige fejlbeskeder oversat (Netværksfejl, prøv igen, osv.)
  • 28 forekomster af "Adgang nægtet." wrapped i __()
  • Alle Test Teams / Test Microsoft / CalDAV fejlbeskeder oversat
  • License-status-indikator (✓ SaaS / ✓ Licens / ⚠ Licens) wrappet med esc_html()
  • $themes-array bruger nu __() til labels
  • Status-badges (Klar til sletning / Om N dage / Aktiv) oversat
  • /languages/therapist-booking.pot opdateret med ~250 nye admin-strings
  • /languages/therapist-booking-en_US.po + .mo regenereret
  • includes/class-tb-therapist-portal.php (terapeut-portal)
  • send_giftcard_confirmation() / send_course_confirmation()
  • admin/class-tb-admin-discounts.php
  • admin/class-tb-admin-accounting.php
  • admin/giftcard-designer.php
  • Cirka 130 tekniske status-tekster og descriptions i kalender-integration
v1.69.01 April 2026
▼
  • `booking.js` læser nu `?lang=` ved sideindlæsning og sender `lang` med på
  • `tb_get_frontend_locale()` udvidet til også at læse `lang` og `client_locale`
  • Ny privat metode `TB_Booking::resolve_client_locale()` gør locale-resolution
  • Bevarer fallback til plugin-indstilling når intet sprog er specificeret
v1.69.00 April 2026
▼
  • `load_plugin_textdomain()` initialiseret i `tb_init`; mappestruktur `/languages/` med `.po`/`.mo`-filer
  • Ny PHP-helper `tb_get_supported_locales()` — udvidelig liste over understøttede sprog (aktuelt da_DK, en_US)
  • Ny PHP-helper `tb_get_frontend_locale()` — løser locale fra (1) `?lang=xx` URL-parameter, (2) plugin-indstilling, (3) fallback da_DK
  • Filter `tb_filter_frontend_locale()` på frontend overstyrer WP-locale; admin følger fortsat WP-bruger-locale
  • Helper `tb_reload_textdomain()` til genindlæsning efter locale-skift (bruges i email-flow)
  • Ny kolonne `tb_bookings.client_locale VARCHAR(10) DEFAULT 'da_DK'` — gemmer hvilket sprog klienten bookede på
  • Tilføjet til både CREATE TABLE og som ALTER TABLE migration for eksisterende installationer
  • `TB_Booking::create()` gemmer locale automatisk via `tb_get_frontend_locale()`
  • Ny indstilling under Indstillinger → Generelt: "Sprog på bookingformular" — dropdown med understøttede sprog
  • `save_settings` validerer locale-værdien mod whitelist; ugyldige værdier falder tilbage til da_DK
  • Bemærk: Selve admin-UI'et forbliver dansk i denne version — admin-oversættelse kommer i v1.70.00
  • Komplet omskrivning af `class-tb-shortcodes.php` — alle synlige tekster wrappet i `__()`/`esc_html__()`/`esc_attr__()`
  • `class-tb-services-shortcode.php` og `class-tb-courses-shortcode.php` — `book_text`-default, leveringstype-labels, varighedsformat, sessions-pluralisering oversat
  • `booking.js` — alle hardcodede danske strings (~90 stk) udskiftet med `TB.i18n`-opslag
  • Ny JS-helper `t(key, ...args)` — sprintf-style erstatning af %s, %1$s, %d osv.
  • Ny JS-helper `kr(amount)` — lokaliseret pris-suffix
  • Lokaliseret `Number.toLocaleString` via BCP-47 locale (`da-DK` / `en-US`)
  • Måneds- og ugedagnavne i kalender og booking-summary nu lokaliseret via TB.i18n.months_long/wd_short/wd_long
  • Ny intern helper `TB_Email::swap_locale_for($booking)` / `swap_locale_back()` — switcher locale før email-bygning og tilbage efter afsendelse
  • Genindlæser plugin-tekstdomæne efter `switch_to_locale()` så `__()`-kald oversættes korrekt
  • Følgende email-funktioner sender nu på klientens locale:
  • `send_admin_notification()` følger admin-locale (typisk dansk)
  • `send_giftcard_confirmation()` og `send_course_confirmation()` ikke oversat i denne version (bruger klinikkens egne tekster fra gavekort-design)
  • `/languages/therapist-booking.pot` — 247 strings (skabelon)
  • `/languages/therapist-booking-en_US.po` — engelsk oversættelse
  • `/languages/therapist-booking-en_US.mo` — kompileret binær
  • Klinikken sætter standardsprog under Indstillinger → Generelt
  • Klienter kan overstyre med URL-parameter: `?lang=en` eller `?lang=en_US`
  • Klientens valgte sprog gemmes i `client_locale` ved booking, så efterfølgende emails (bekræftelse, ændring, aflysning, påmindelse) sendes på samme sprog uanset klinikkens standardsprog
v1.68.32 April 2026
▼
  • Fjernet separat "Påmindelser" submenu-punkt fra sidepanelet
  • Tilføjet "⏰ Påmindelser"-faneblad i nav-tab-wrapper på Alle bookinger siden
  • Påmindelsesindholdet renderes direkte via `render_reminders_tab()` (omdøbt fra `page_reminders()`)
  • Aktiv/deaktiveret-status vises som badge direkte under fanebladet
v1.68.31 April 2026
▼
  • Dialog der vises inden viderestilling til betaling siger nu "Du viderestilles nu til kortbetaling..." ved Stripe og "...til MobilePay betaling..." ved MobilePay
v1.68.30 April 2026
▼
  • `process_confirmed_payment()` refererede `s.label` i SQL — kolonnen eksisterer ikke i `tb_services` (hedder `s.name`)
  • MySQL returnerede NULL → `if (!$booking) return` — al efterfølgende kode (DB-opdatering, mail, kalender) skippedes
  • Rettelse: `s.label AS service_label` → `s.name AS service_label`
v1.68.29 April 2026
▼
  • `'stripe'` tilføjet til gyldige betalingsmetoder i `TB_Booking::create()` — ellers gemtes alle kortbetalinger som 'mobilepay' i DB
  • `handle_return()` kalder nu `process_confirmed_payment()` direkte uden API-opslag: Stripe kalder kun success_url ved gennemført betaling — API-opslaget var overflødigt og fejlede muligvis pga. netværks-timeout
  • `process_confirmed_payment()` sætter nu `payment_method = 'stripe'` i DB (fuld betaling og depositum)
  • Booking vises nu korrekt som "Bekræftet / Betalt / Kort" i admin efter Stripe-betaling
  • Bekræftelsesmail sendes nu korrekt ved Stripe-betalinger
v1.68.28 April 2026
▼
  • Booking med `status='pending'` sættes til `cancelled` når betaling afbrydes (MobilePay og Stripe)
  • Klienten modtager en tydelig email: "Booking ikke gennemført" med link til at booke igen
  • Booking oprettes aldrig i kalender ved afbrudt betaling (kun ved bekræftet betaling)
  • Bookingsiden viser en klar fejlside i stedet for "Betaling afventer" ved abort
  • `?tb_payment_pending` og `?tb_stripe_cancelled` viser nu samme fejlside som `?tb_payment_failed`
v1.68.28 April 2026
▼
  • Booking med `status='pending'` sættes til `cancelled` når betaling afbrydes (MobilePay og Stripe)
  • Klienten modtager en tydelig email: "Booking ikke gennemført" med link til at booke igen
  • Booking oprettes aldrig i kalender ved afbrudt betaling (kun ved bekræftet betaling)
  • Bookingsiden viser nu en klar fejlside i stedet for "Betaling afventer" ved abort
  • Fjernet: `?tb_payment_pending` og `?tb_stripe_cancelled` — erstattet af `?tb_payment_failed`
v1.68.27 April 2026
▼
  • `deposit_choice` manglede i `$.post()`-data-objektet i `submitBooking()` — formularen bruger ikke `serialize()` men et manuelt objekt
  • Serveren modtog aldrig valget og faldt altid tilbage til depositum
  • Rettelse: `deposit_choice: $('#tb-deposit-choice').val()` tilføjet til POST-data
v1.68.26 April 2026
▼
  • `depositActive` var defineret efter `hasDeposit` brugte den → `hasDeposit` altid `false` pga. JS var-hoisting
  • Rettelse: `depositActive` flyttes til at blive beregnet før `hasDeposit`
v1.68.25 April 2026
▼
  • Hvis en ydelse kræver depositum, grås "Betal ved behandling"-muligheden ud med teksten "Ikke muligt ved depositum"
  • Hvis klienten har valgt "Betal ved behandling" og vælger en ydelse med depositum, skiftes automatisk til MobilePay (eller Stripe)
  • Ingen serverside-ændringer nødvendige
v1.68.24 April 2026
▼
  • Når en ydelse har depositum, vises nu to valgmuligheder i bookingformularen:
  • Valget er visuelt integreret med de eksisterende betalingskort (samme stil)
  • Knaptekst og prisinformation opdateres dynamisk efter valg
  • Panel nulstilles automatisk ved ny ydelse/terapeut
  • AJAX læser `deposit_choice` og bruger fuld pris ved valg af "full"
v1.68.23 April 2026
▼
  • str_replace slugte afsluttende `}` for foreach + `wp_send_json_success()` + `}` for `get_all_services()` → parse-fejl ved aktivering
  • Filen er nu syntaktisk korrekt (brace-depth = 0)
v1.68.22 April 2026
▼
  • Admin: null-guard på `$service->deposit_amount` ved oprettelse af ny ydelse
  • CSS: manglende semikolon i `display:none;` inline style rettet
  • Stripe: `handle_return` guard udvidet til også at skippe ved `deposit_paid`-status (undgår dobbelt-processing ved webhook-race)
v1.68.21 April 2026
▼
  • Terapeuten kan nu kræve et depositum på ydelsesniveau — indstilles i Ydelseskatalog under "Depositum"
  • Klienten betaler kun depositumbeløbet online (MobilePay eller Stripe); restbeløbet betales ved fremmøde
  • Depositum-badge vises på ydelseskortet i bookingformularen
  • Betalings-UI viser tydeligt opdeling: "Betales nu: X kr. (depositum) — Restbeløb ved fremmøde: Y kr."
  • Bekræftelsesmail inkluderer separat "Restbeløb"-linje med restbeløb når depositum er betalt
  • DB: `deposit_amount` på `tb_services`; `requires_deposit`, `deposit_amount`, `deposit_paid`, `deposit_payment_id` på `tb_bookings`
  • Ny `payment_status`-value: `deposit_paid` (vises som "Depositum betalt" i admin)
  • Fuldt bakud-kompatibelt: eksisterende ydelser og bookinger påvirkes ikke (DEFAULT 0)
v1.68.20 April 2026
▼
  • Ny `class-tb-reminder.php` — sender påmindelsesmail 26 timer før aftale via WP hourly cron
  • Cron finder bookinger i ±30 min. vindue; sender kun én gang (marker via `reminder_sent_at`)
  • Ny `TB_Email::send_reminder()` — branded reminder-email med aftaledetaljer, mødelink og aflysningsknap
  • Klient mindes om 24-timers aflysningsfrist med tydeligt fremhævet infobox
  • Tilpasset intro-tekst kan sættes i admin-indstillinger
  • DB-migration: `reminder_sent_at DATETIME NULL` på `tb_bookings`
  • DB: ny `tb_reminder_log` tabel (id, booking_id, client_email, client_name, therapist_name, service_name, booking_date, start_time, sent_at, status, is_test)
  • Statistik-bokse: sendte / fejlede / test / i alt
  • Log-tabel med type (Auto/Test), klientnavn, email, aftaledato, terapeut, status
  • Test-afsender: tabel over kommende bookinger med "📧 Send test"-knap per booking
  • "Nulstil"-knap nulstiller `reminder_sent_at` så en booking kan genudsende
  • AJAX-handlers: `tb_send_test_reminder` + `tb_reset_reminder`
v1.68.14 April 2026
▼
  • Tilføjet to nye Moderne-temaer: Moderne Mørkt og Moderne Lyst
v1.68.15 April 2026
▼
  • TB_MicrosoftCalendar::is_configured() relay-aware — returnerer true når relay er aktivt, så Teams-test virker uden lokale MS credentials
  • TB_MicrosoftCalendar::get_valid_token() kalder relay ms/refresh-token endpoint ved token-fornyelse i relay-tilstand
  • relay_url: tvinges automatisk til https:// ved gem — http:// giver mixed content fejl
  • relay_url: advarsel i admin hvis URL bruger http://
  • Moderne Mørkt: næsten sort (#0b0c0f) med orange/coral accent (#ff5c35)
  • Moderne Lyst: varm off-white (#fafaf9) med samme coral accent
  • Valg af Moderne-tema foreslår automatisk DM Sans-font i designindstillingerne
v1.68.13 April 2026
▼
  • Kortbetaling: Visa, Mastercard og Maestro kort-ikoner vises som badges ud for Kortbetaling-valgmulighed i bookingformularen
v1.68.12 April 2026
▼
  • Stripe kortbetaling: kunder kan nu vælge at betale med kredit- eller debitkort via Stripe Hosted Checkout
  • Ny klasse class-tb-stripe.php: opretter Checkout Sessions, verificerer webhook-signaturer (HMAC-SHA256), håndterer return og cancel callbacks
  • Admin: Stripe-sektion i Betaling-fane med Secret Key, Webhook Secret og Test-forbindelsesknap
  • Admin: ny indstilling allow_card (Kortbetaling aktivér/deaktivér pr. site)
  • Kortbetaling radio-knap i bookingformular — vises kun når allow_card er slået til
  • Webhook URL vist direkte i admin: /?tb_action=stripe_webhook med event checkout.session.completed
  • Stripe-annulleret besked: egen besked når kunden forlader Stripe Checkout uden at betale
  • Betaling afventer-besked opdateret til at dække både MobilePay og kortbetaling
  • stripe badge i booking-oversigt og manuelt booking-panel
  • TB_Stripe::create_checkout_session() understøtter både booking-objekter og array-format (gavekort/forløb)
  • Dobbelt-bekræftelse guard: både webhook og return-handler tjekker payment_status !== paid inden emails sendes
  • session_id gemmes som payment_order_id på booking for fuld sporbarhed
  • Licensgate: kortbetaling kræver samme plan som MobilePay (has_feature mobilepay)
v1.67.04 april 2026
▼
  • Rettet: locked_notice viste fejlagtigt låse-besked på Klinik-plan
v1.68.11 April 2026
▼
  • Refresh-knap på consent-URL sektion (virker både ved succes og fejl)
  • Detaljeret fejlvisning: fejltype, HTTP-status, relay-respons-body og liste over mulige årsager
v1.68.10 April 2026
▼
  • Consent-URL fetch: site-parameter manglede i relay-kaldet — relay validerede licensen mod eget domæne i stedet for kundens, hvilket gav 'ugyldig licens'
v1.68.09 April 2026
▼
  • Consent-URL hentes nu fra browser (fetch API) i stedet for server-til-server — løser fejl hvor booking-server ikke kunne nå relay-server direkte
v1.68.08 April 2026
▼
  • Kalender-indstillinger: Microsoft admin consent-URL hentes automatisk fra relay-server og vises direkte med Kopiér-knap
  • Cache på 1 time for consent-URL (ryddes automatisk hvis relay-URL ændres)
  • save_settings: \$old-variabel tilføjet så cache-ryd ved URL-ændring virker korrekt
v1.68.07 April 2026
▼
  • Kalender-indstillinger: link til Microsoft organisationsgodkendelse (admin consent) når relay er aktivt
  • Vejledning om at organisationsbrugere skal have IT-admin til at godkende én gang
v1.68.06 April 2026
▼
  • Kritisk: use_teams-checkboxen gemtes ikke fordi TB_Therapist::save() har en hardkodet feltliste — use_teams tilføjet til listen
v1.68.05 April 2026
▼
  • Per-terapeut Teams-toggle: 'Brug Teams til online møder' vises på terapeutprofil når Microsoft 365 er forbundet
  • DB-migration: `use_teams TINYINT(1)` kolonne på `tb_therapists`
  • `tb_maybe_create_online_meeting()` respekterer per-terapeut `use_teams`-flag
  • Bagudkompatibilitet: global `online_meeting_provider = teams/both` virker stadig som fallback
v1.68.04 April 2026
▼
  • Kritisk fejl: Microsoft relay sendte 'microsoft' som provider-streng, men klienten tjekkede for 'ms' — $update-array blev tomt, SQL-fejl ved gem af tokens. Relay sender nu konsekvent 'ms'.
v1.68.03 April 2026
▼
  • Relay pickup: fuld debug-log via transient — viser præcist hvad der sker ved hvert trin
  • Relay pickup: tydelig fejlbesked hvis Microsoft ikke returnerer refresh_token
  • Relay pickup: DB-verificering efter gem — bekræfter at tokens faktisk er gemt
  • Admin: debug-log vises automatisk på terapeutsiden efter relay-forsøg
  • Admin: relay_error URL-parameter giver specifik fejlbesked per fejltype
  • Relay pickup: fejl resulterede i stum page-reload — nu altid redirect med fejlkode
v1.68.02 April 2026
▼
  • Double-encoding af relay-URL i returlink fra relay (brugte rawurlencode + add_query_arg)
  • Fjernet overflødig urldecode() i pickup-handler — PHP dekoder $_GET automatisk
  • Microsoft OAuth: skiftet fra prompt=select_account til prompt=consent for at tvinge ny refresh_token
  • Microsoft forbindelse viste ikke som aktiv fordi refresh_token ikke altid blev returneret
v1.68.00 April 2026
▼
  • TB OAuth Relay integration: terapeuter forbinder Google Calendar og Microsoft 365 uden at kunden selv opretter API-credentials
  • Ny indstilling under Kalender-fanen: Relay-toggle + Relay-server URL
  • `includes/class-tb-relay-client.php`: pickup-handler og auth-URL-builder
  • Direkte credentials (Google/Microsoft) skjules automatisk når relay er aktiv
  • Succesbeskeder for relay-forbindelser (google_relay_connected, ms_relay_connected)
  • SaaS-mode bypasser relay automatisk (TB_SAAS_MODE konstant)
  • Årsag: feature-nøgle blev afledt forkert fra label-tekst (fx MobilePay betaling → mobilepay_betaling)
  • Fix: locked_notice tager nu eksplicit feature_key parameter
v1.67.03 april 2026
▼
  • HMAC-signatur fejl blokerer ikke længere aktivering — logges som advarsel i stedet
  • URL-skift til ny licensserver rydder automatisk gammel HMAC-nøgle og cache
  • Ny knap: Nulstil HMAC-nøgle — vises ved signatur-fejl i licens-UI
  • Ny AJAX-action: clear_secret til manuel nulstilling
v1.67.02 april 2026
▼
  • Rettet HMAC-signatur: payload sendes nu som pre-serialiseret JSON-streng
  • Eliminerer re-serialiseringsfejl i WordPress REST API der forårsagede ugyldig signatur
  • Bagudkompatibel: understøtter stadig gammelt payload-format
v1.67.01 april 2026
▼
  • Rettet HMAC-signatur fejl: bruger nu json_encode med UNESCAPED_UNICODE|UNESCAPED_SLASHES
  • Løser aktiverings-fejl ved kundenavne med æøå eller andre non-ASCII tegn
v1.67.00 April 2026
▼
  • **Rebrand**: Plugin omdøbt til bookbookbook
  • Plugin Name, URI, Author og Author URI peger nu på bookbookbook.dk
  • Alle brugersynlige referencer til "Terapeut Booking System" og "iixo.dk" er opdateret
  • iCal PRODID opdateret i email og CalDAV
  • Licensside-link opdateret til bookbookbook.dk
v1.66.07 april 2026
▼
  • Licensbegrænsninger håndhæves nu korrekt
  • Solo-plan: maks 1 terapeut — oprettelse blokeres ved grænsen med klar fejlbesked
  • Terapeut-liste viser tæller (x/max) og deaktiverer Tilføj ny-knap ved grænsen
  • MobilePay-betaling i booking-flow blokeres uden Klinik-plan
  • Admin AJAX: Teams-test, Zoom-test og MobilePay-test blokeres uden korrekt plan
v1.66.06 april 2026
▼
  • Licens-faneblad har nu samme afstand som øvrige faneblade på indstillingssiden
  • Indstillinger menupunkt flyttet til under stregen over Versionslog
v1.66.05 april 2026
▼
  • Gavekort vises nu korrekt som aktiv feature på alle plans i licensfaneblad
  • Feature-listen i admin henter nu fra DEFAULT_FEATURES som single source of truth
  • Licensserveren: giftcards tilføjet til solo, klinik og pro plans
v1.66.04 april 2026
▼
  • Gavekort tilgængeligt fra Solo-plan og opefter
  • Gavekort-fane og køb blokeres i frontend uden gyldig licens
  • AJAX purchase_giftcard afvises uden giftcards-feature
  • Lock notice på Gavekort-siden i admin
v1.66.03 april 2026
▼
  • Licensserver URL og HMAC-nøgle kan nu indtastes direkte i admin — ingen wp-config.php nødvendig
  • Trinvis guide: Trin 1 gem forbindelse, Trin 2 aktivér nøgle
  • Aktivér-knap deaktiveret indtil forbindelsen er gemt
  • save_connection AJAX-handler gemmer tb_license_api_url og tb_license_secret i databasen
v1.66.02 april 2026
▼
  • Licens enforcement: bookingformular blokeres ved manglende licens
  • 14-dages grace period fra installation inden blokering træder i kraft
  • Admin-banner på alle TB-sider med dage-nedtælling og link til licens-fane
  • AJAX create_booking blokeres ved udløbet grace period
  • record_install() gemmer installationstidspunkt ved aktivering
v1.66.01 april 2026
▼
  • Licenssystem integreret: plugin-licens og SaaS-mode
  • Ny Licens-fane i Indstillinger med plan-oversigt og feature-liste
  • Feature-gates på Teams, Zoom og MobilePay (kræver Klinik-plan)
  • Daglig baggrundsvalidering med 7-dages grace period ved API-nedetid
  • HMAC-signerede API-svar — licensserver-integration klar til tb-license-server plugin
v1.66.00 April 2026
▼
  • Terapeutportal følger nu designtema automatisk
  • Alle hardcodede farver i portal erstattet med CSS-variabler (var() + color-mix())
  • PWA theme-color og touch-ikon bruger designets baggrundsfarve og accentfarve
  • Portal arver accent, baggrund, tekst, kanter og border-radius fra designmodulet
v1.66.00 April 2026
▼
  • Terapeutportal følger nu designtema automatisk
  • Alle hardcodede farver i portal erstattet med CSS-variabler
  • PWA theme-color og touch-ikon bruger designets baggrundsfarve
  • Portal arver accent, baggrund, tekst, kanter og radius fra designmodulet
v1.65.6 April 2026
▼
  • Bugfix: CVR-nummer på terapeut gemmes nu korrekt (feltet manglede i TB_Therapist::save whitelist)
v1.65.5 April 2026
▼
  • Terapeuter: nyt CVR-nummer felt under terapeut-indstillinger
  • Faktura fra booking: terapeut-oplysninger (navn, email, adresse, CVR) udfyldes nu automatisk i Udsteder-sektionen
  • Terapeut-dropdown i faktura-editor: CVR medtages nu når man vælger terapeut og klikker Udfyld
  • Database: ny kolonne clinic_cvr på tb_therapists (migreres automatisk)
v1.65.4 April 2026
▼
  • Bookinger: ny 📄 Faktura-knap på hver booking-række — klik opretter en ny faktura forudfyldt med klientnavn, email, ydelse, dato og pris fra bookingen
v1.65.3 April 2026
▼
  • Faktura-editor: terapeut-dropdown i Udsteder-sektionen udfylder navn, email og adresse automatisk
  • Faktura-visning: Luk-knap lukker nu fanen korrekt (bruger window.close() i stedet for history.back)
v1.65.2 April 2026
▼
  • Faktura: tekstfarve på farvet baggrund kan nu indstilles separat (header + tabel)
  • Faktura: accent-tekstfarve for totalbeløb og betalingsboks-label kan indstilles
  • Faktura-design flyttet som fane (🎨 Design) direkte i Fakturaer-menupunktet
  • Menu: ny rækkefølge med to visuelle adskillelsesstreger i WordPress admin
  • Menu: Regnskab og Fakturaer samlet i økonomi-gruppe
  • Menu: Versionslog, PHP Error Log og GDPR samlet i system-gruppe
v1.65.1 April 2026
▼
  • Faktura linjeposter: katalog-picker med ydelseskatalog og forløb — vælg direkte fra dropdown
  • Fritekst-linje stadig mulig ved siden af katalog-valg
  • Ny admin-side: Faktura-design & indstillinger (Faktura-design i menuen)
  • Faktura-indstillinger: primær farve med live-forhåndsvisning, logo-upload via WordPress mediebib.
  • Faktura-indstillinger: betalingsoplysninger (reg.nr., kontonr., IBAN, SWIFT, fritekst)
  • Betalingsoplysninger vises automatisk i boks nederst på alle fakturaer
  • Faktura-header, tabeloverskrifter og accentfarver afspejler valgt farve
v1.65.0 April 2026
▼
  • Nyt regnskabsmodul: Indtægtsoversigt med KPI-kort, månedsgraf og terapeut-/ydelsesfordeling
  • Datofilter med genveje (denne måned, forrige måned, kvartal, år)
  • Eksport til Excel/CSV med UTF-8 BOM (Excel åbner korrekt med dansk tegnsæt)
  • Nyt faktura-modul: opret, rediger og send fakturaer via email
  • Per-linje momshåndtering: 0% momsfrit og 25% kan blandes på samme faktura
  • Auto-fakturanummerering med årsbaseret sekvens (2026-001, 2026-002 ...)
  • Forhåndsudfyld faktura direkte fra booking med ét klik
  • Print-venlig HTML-faktura: åbnes i ny fane, udskrives/gemmes som PDF via browser
  • Ny database-tabel: tb_invoices
v1.65.0 April 2026
▼
  • Nyt regnskabsmodul: Indtægtsoversigt med KPI-kort, månedsgraf og terapeut-/ydelsesfordeling
  • Datofilter med genveje (denne måned, forrige måned, kvartal, år)
  • Eksport til Excel/CSV med UTF-8 BOM (Excel åbner korrekt med dansk tegnsæt)
  • Nyt faktura-modul: opret, rediger og send fakturaer via email
  • Per-linje momshåndtering: 0%% momsfrit og 25%% kan blandes på samme faktura
  • Auto-fakturanummerering med årsbaseret sekvens (2026-001, 2026-002 ...)
  • Forhåndsudfyld faktura direkte fra booking med ét klik
  • Print-venlig HTML-faktura: åbnes i ny fane, udskrives/gemmes som PDF via browser
  • Ny database-tabel: tb_invoices
v1.65.0 April 2026
▼
  • Nyt regnskabsmodul: Indtægtsoversigt med KPI-kort, månedsgraf og terapeut-/ydelsesfordeling
  • Datofilter med genveje (denne måned, forrige måned, kvartal, år)
  • Eksport til Excel/CSV med UTF-8 BOM (Excel åbner korrekt med dansk tegnsæt)
  • Nyt faktura-modul: opret, rediger og send fakturaer via email
  • Per-linje momshåndtering: 0% momsfrit og 25% kan blandes på samme faktura
  • Auto-fakturanummerering med årsbaseret sekvens (2026-001, 2026-002 ...)
  • Forhåndsudfyld faktura direkte fra booking med ét klik
  • Print-venlig HTML-faktura: åbnes i ny fane, udskrives/gemmes som PDF via browser
  • Ny database-tabel: tb_invoices
v1.64.13 April 2026
▼
  • Ydelseskatalog: ny "Dyblink" kolonne med kopi-knap til direkte booking-link per ydelse
v1.64.12 April 2026
▼
  • Nyt bookingflow: klienten vælger nu ydelse først (trin 2), derefter terapeut filtreret på ydelsen (trin 3)
  • Ny AJAX-handler tb_get_all_services returnerer alle aktive ydelser uden terapeut-filter
  • Terapeut-overskrift viser nu 'Vælg terapeut — [Ydelse]' efter ydelsesvalg
  • Klienter fra ydelse-siden (service_id i URL) springer ydelsestrinnet over og lander direkte på terapeut-valg
v1.64.11 April 2026
▼
  • Dato-trin viser nu ydelsens navn i overskriften: 'Vælg dato — Parterapi'
v1.64.10 April 2026
▼
  • Ydelse auto-vælges efter terapeut-valg: klienter der kom fra en ydelse-side springer nu trin 3 (ydelsesvalg) over og lander direkte på kalender
v1.64.9 April 2026
▼
  • Ydelse-link springer nu direkte til terapeut-valg (trin 2) uden at vise type-valgskærmen
  • Forløb-link springer nu direkte til forløbs-oversigt uden at vise type-valgskærmen
  • class-tb-courses-shortcode.php: book-link tilføjer nu ?mode=course til URL
  • class-tb-shortcodes.php: booking-app får nu data-mode attribut fra PHP (samme strategi som data-service)
v1.64.8 April 2026
▼
  • Rettet: service_id URL-parameter virker nu på staging-sites i undermapper
  • service_id skrives nu som data-service attribut direkte på booking-elementet af PHP — afhænger ikke af URL-parsing
  • URL-parameter ?service_id=X bevares som fallback for direkte links
v1.64.7 April 2026
▼
  • Rettet: Terapeut-trinnet springes ikke længere over selv om kun én terapeut tilbyder ydelsen — klienten skal altid se og bekræfte hvem der er valgt som behandler
v1.64.6 April 2026
▼
  • Ydelsespreselection: book-knap i shortcode tilføjer nu ?service_id=X til booking-URL
  • Bookingformular filtrerer terapeuter baseret på service_id — terapeuter der ikke tilbyder ydelsen vises gråede og kan ikke vælges
  • Hvis kun én terapeut tilbyder den valgte ydelse, vælges den automatisk
  • Terapeuter sorteres så dem der tilbyder ydelsen vises øverst
v1.64.5 April 2026
▼
  • Bekræftelsesmail til klient viser nu behandlingsnavnet i detalje-tabellen
  • Admin notifikationsmail viser nu behandlingsnavnet mellem Terapeut og Dato
v1.64.4 April 2026
▼
  • Bookingformular viser nu korrekt platform (Zoom/Teams/Begge) baseret på indstillingen under Online møder
  • Radio-label og info-boks tilpasses dynamisk til valgt udbyder
  • Teams vises med lilla farve (#6264A7), Zoom med blå (#2D8CFF)
v1.64.3 April 2026
▼
  • Rettet: Betaling og Design faner var tomme — manglende </div> på Online møder-fanen
  • tb-tab-online manglede sin afsluttende div, hvilket nested Betaling og Design forkert i DOM'en
v1.64.2 April 2026
▼
  • Rettet: Admin consent redirect gik til wp-admin login — bruger nu home_url som fallback når ikke logget ind
  • Rettet: prompt=consent ændret til select_account — brugere ser ikke consent-siden igen efter admin har godkendt
  • Organisationsgodkendelse: vejledning tilføjet om Azure Enterprise Applications → User assignment required → No
v1.64.1 April 2026
▼
  • Rettet: Admin consent callback gav 'ugyldig state' fejl — admin consent og bruger-OAuth er nu separate flows
  • Admin consent-link generator tilføjet under Indstillinger → Kalender → Microsoft 365
  • Kopiér-knap til consent-linket der sendes til organisationens IT-administrator
  • Succes-besked vises i admin når organisationsgodkendelse er gennemført
v1.64.0 April 2026
▼
  • CHANGELOG.md opdateres automatisk ved hvert versionsbump via build-script
  • Installationslog viser nu altid korrekte ændringsnoter fra CHANGELOG.md
  • build.py oprettet: automatiserer version-bump, CHANGELOG og ZIP-pakning
v1.63.9 April 2026
▼
  • Installationslog opdateres nu korrekt ved aktivering/opdatering via force=true parameter
  • `record_version()` logger altid ved aktivering — duplikat-tjek kun ved auto-migrering
  • Changelog-noter i installationslog: regex rettet til at matche `## v1.63.x` format
  • CHANGELOG.md udvidet med detaljerede beskrivelser tilbage til v1.50.0 (130+ versioner)
v1.63.8 April 2026
▼
  • Rettet: Installationslog-noter viste ingenting — regex matchede `## [version]` men CHANGELOG.md bruger `## vX.Y.Z` format
  • Rettet: Changelog-overskrifter usynlige mod mørk baggrund — farver ændret til guld (#c9a96e / #e2c99a)
  • Dato-tekst i changelog lysnet fra #888 til #aaa
v1.63.7 April 2026
▼
  • Rettet: Teams-møde-oprettelse fejlede med HTTP 400 — `/me/onlineMeetings` kræver `OnlineMeetings.ReadWrite` scope
  • Ny tilgang: Teams-møder oprettes via `/me/events` med `isOnlineMeeting: true` — virker med eksisterende `Calendars.ReadWrite` scope
  • Kræver Microsoft 365 Business-licens (ikke personlig/Home-licens) for at generere Teams join-URL
v1.63.6 April 2026
▼
  • Rettet: Teams booking-fejl — `TB_MicrosoftCalendar::get_access_token()` eksisterer ikke; korrekt metode er `get_valid_token()`
  • Teams testknap tilføjet under Indstillinger → Online møder med terapeut-dropdown
  • Testknappen viser hvilke terapeuter der er forbundet med Microsoft 365 (✓)
v1.63.5 April 2026
▼
  • Rettet: Duplikeret `if`-blok i `class-tb-email.php` fra Python-redigering gav PHP-crash (brace-ubalance)
v1.63.4 April 2026
▼
  • Microsoft Teams integration: møder oprettes automatisk via Microsoft 365-forbindelsen
  • Ny udbyder-vælger under Indstillinger → Online møder: Zoom / Microsoft Teams / Begge
  • Admin bookingoversigt: separate knapper for Zoom (blå) og Teams (lilla)
  • Terapeutportal: "Start Teams"-knap tilføjet
  • Bekræftelsesmail: Teams-boks (lilla) og/eller Zoom-boks (blå) vises
  • Teams-møder slettes automatisk ved booking-sletning
  • Database: nye kolonner `teams_meeting_id` og `teams_join_url`
  • Ny `class-tb-teams.php`
v1.63.3 April 2026
▼
  • Versionslog: changelog-tekst lysere (#cccccc), kode-blokke med lys blå farve (#9ecfff)
  • Versionslog: komplet CHANGELOG.md med alle versioner fra v1.0.0
v1.63.2 April 2026
▼
  • Versionslog gendannet til original to-kolonne layout (installationshistorik + CHANGELOG.md)
  • Forbedret Markdown-rendering: version-badges, kode-formatering, aktuel-badge i guld
v1.63.1 April 2026
▼
  • CHANGELOG.md oprettet i plugin-mappen og integreret med versionslog-siden
  • Versionslog viser nu automatisk noter fra CHANGELOG.md ved installation
v1.63.0 April 2026
▼
  • Ydelseskatalog og bookingoversigt bruger nu WordPress native `nav-tab-wrapper`
  • Erstatter `<ul class="tb-filter-tabs">` som havde inkonsistent styling
  • Alle admin-sider har nu ensartet faneblade-design
v1.62.9 April 2026
▼
  • Kantfarve i design-fanen ændret fra tekstfelt til farvevælger
  • rgba()-kantfarver konverteret til hex i alle tre temaer (mørkt: #4a3a20, lyst: #d0c8be, neutralt: #d8d2ca)
v1.62.8 April 2026
▼
  • Rettet: Indstillingsside crashede igen pga. ukorrekt PHP-tagstruktur i ny fane-implementering
  • Faneblade implementeret med JavaScript — ingen PHP-strukturændringer i page_settings()
  • Gem-knappen skjules automatisk på Design-fanen (den har sin egen gem-knap)
v1.62.7 April 2026
▼
  • Indstillingssiden opdelt i seks faneblade: Generelt, Gavekort e-mail, Kalender, Online møder, Betaling, Design
  • Faneblade skifter øjeblikkeligt uden sideopdatering
  • Aktivt faneblad huskes via sessionStorage
v1.62.6 April 2026
▼
  • Rettet: Indstillingsside crashede — manglende `}` i page_settings() fra design-sektion
  • PHP-brace-balance verificeret og rettet
v1.62.5 April 2026
▼
  • Fuld manuel farvestyring i Design-fanen
  • Baggrunde: primær, sekundær, kort (3 farvevælgere)
  • Tekstfarver: primær, dæmpet, overskrifter, fremhævet, tekst på knapper (5 farvevælgere)
  • Accentfarver: accent og mørk accent (2 farvevælgere)
  • Kantfarve, fejlfarve og succesfarve (3 farvevælgere)
  • Nulstil-knapper gendanner tema-standarderne enkeltvis
v1.62.4 April 2026
▼
  • Rettet: `--tb-creme` (lys creme) og `--tb-gold-light` (lys guld) var usynlige i lyst/neutralt tema
  • Disse bruges som tekstfarver mange steder — overskrevet til mørke bruntoner i lyse temaer
  • Lyst: creme=#2a1e10, gold-light=#7a5020 — Neutralt: creme=#2a1e10, gold-light=#6e5a3a
v1.62.3 April 2026
▼
  • Primær tekst mørkere i lyst og neutralt tema: #2a2218 → #1a1208
  • Dæmpet tekst mørkere: #7a7065 → #4a4035
  • Forbedret kontrast for begge lyse temaer
v1.62.2 April 2026
▼
  • Rettet: Bookingformular brugte ikke valgt tema
  • Bookingformularen (.tb-wrap) bruger andre CSS-variabelnavne end portalen (.portal-wrap)
  • CSS-injektor opdateret til at sætte korrekte variabler på hvert element separat
v1.62.1 April 2026
▼
  • Design-system implementeret med tre temaer: Mørkt, Lyst, Neutralt
  • CSS custom properties injiceres via wp_head på alle sider med plugin-indhold
  • Design-fane tilføjet under Indstillinger
  • Temavalg med visuel forhåndsvisning af farver, accentfarve-vælger, hjørnerunding-slider, Google Font URL og font-navn
  • Live preview opdateres i realtid mens du justerer
v1.62.0 April 2026
▼
  • Rettet: Auto-pris i terapeutportal virkede ikke
  • Årsag: `tb_get_service_price` handler kræver WordPress-login (wp_ajax_), men portalen bruger sin egen session
  • Ny dedikeret handler `tb_get_service_price_portal` validerer mod portal-session i stedet
  • Alle dropdowns i portalen mørke: `.form-group select` tilføjet til eksisterende mørk CSS-regel
v1.61.9 April 2026
▼
  • Rediger booking tilføjet i terapeutportalen — alle samme muligheder som admin
  • Behandlingsvælger med automatisk pris-opdatering (respekterer terapeut-override)
  • Ledig tid hentes fra kalenderen ved dato + behandlingsvalg
  • Starttid → sluttid beregnes automatisk fra behandlingens varighed
  • Send ændringsmail til klienten (til/fra flueben)
  • Sikkerhedstjek: terapeuten kan kun redigere sine egne bookinger
v1.61.8 April 2026
▼
  • Klinikadresse-felt tilføjet på terapeutprofil
  • Adressen indsættes automatisk i alle bekræftelses- og ændringsmails til klienter
  • Vises uanset leveringstype (fysisk, online eller telefon)
  • Database: ny kolonne `clinic_address` VARCHAR(500) på `tb_therapists`
  • Migration kører automatisk ved opdatering
v1.61.7 April 2026
▼
  • Auto-pris respekterer terapeut-specifikke prisoverstyrelser via `get_for_therapist_single()`
  • Ændringsmail redesignet med mørke tabelrækker (#2a2a2a / #222222 skiftevis)
  • Guld labels og lys tekst i ændringsmail
  • Pris-kolonne tilføjet i ændringsmail
v1.61.6 April 2026
▼
  • Ændringsmail sendes automatisk til klienten ved redigering i admin
  • "Send ændringsmail til klienten" flueben er markeret som standard
  • Mailen indeholder dato, tidspunkt, behandling, terapeut, pris og klinikadresse
v1.61.5 April 2026
▼
  • Rediger-modal forbedret: behandlingsvælger med alle ydelser
  • Pris opdateres automatisk ved behandlingsskift
  • Ledig tid hentes fra kalenderen ved dato + behandlingsvalg
  • Starttid → sluttid beregnes automatisk fra behandlingens varighed
v1.61.4 April 2026
▼
  • Rettet: Rediger-knap virkede ikke — JS-koden var placeret uden for jQuery-wrapper og havde ikke adgang til `TB_Admin.nonce`
  • Rettet: Terapeut-dropdown viste ikke valgt navn ved filtrering — strict `===` sammenligning mellem `intval()` og database-string
v1.61.3 April 2026
▼
  • Terapeut-filter dropdown tilføjet i admin bookingoversigt
  • Filteret viser terapeutens navn ved valg
  • Status-filter og terapeut-filter kan kombineres
  • "× Nulstil filter" nulstiller begge filtre
  • Rediger-knap åbner modal med alle redigerbare felter: dato, tid, behandling, klient, note, pris, status, betalingsstatus
  • Send ændringsmail til klienten (til/fra)
v1.61.2 April 2026
▼
  • Ydelse-kolonne tilføjet til admin bookingoversigt
  • Vises efter Terapeut-kolonnen
  • Hentes fra `service_label` (COALESCE af `service_name`)
v1.61.1 April 2026
▼
  • Rettet: Overskrifter i shortcode-kort viste "4 Parterapisamtaler" — Colibri-tema CSS counter tæller h3-elementer
  • `<h3>` erstattet med `<div>` med præcis identisk styling — visuelt ingen forskel
v1.61.0 April 2026
▼
  • Forløbs-shortcode `[therapist_courses]` tilføjet — direkte kopi af ydelseslogikken tilpasset forløb
  • Viser sessionsantal og tilknyttet ydelsesnavn i stedet for varighed og leveringstype
  • Identisk `center`, `columns`, `card_width`, `show_price`, `book_url`, `book_text` parametre
v1.60.9 April 2026
▼
  • `columns`-parametret styrer nu max-bredden på flex-wrapperen
  • `columns="2"` + `card_width="280"` → `max-width: 584px` (2×280 + 24px gap)
  • Sikrer at kortene aldrig vises i flere kolonner end angivet
v1.60.8 April 2026
▼
  • JavaScript `setProperty('width', '280px', 'important')` sættes direkte på hvert kort
  • Eneste måde at sætte inline `!important` via JS — overskriver temaets CSS fuldstændigt
v1.60.7 April 2026
▼
  • `width`, `max-width` og `min-width` med `!important` sættes som inline style direkte på kort-element
v1.60.6 April 2026
▼
  • Scoped ``-tag med `!important` injiceres direkte i shortcode-outputtet
  • Hvert grid får unikt ID (tb-grid-[hash]) så regler kun påvirker netop det grid
v1.60.5 April 2026
▼
  • Tre bredde-egenskaber sat simultant på kort: `width`, `max-width`, `min-width` alle til `card_width`
  • Næsten umuligt for temaer at overskrive alle tre på én gang
v1.60.4 April 2026
▼
  • Flexbox erstatter CSS grid for `center="yes"` — `display:flex; flex-wrap:wrap; justify-content:center`
  • Langt mere robust på tværs af temaer end grid-baseret centrering
v1.60.3 April 2026
▼
  • PHP beregner grid-wrapperens `max-width` eksplicit: `columns × card_width + (columns-1) × gap`
v1.60.2 April 2026
▼
  • Fundamental ændring i centrering: `max-width` og `margin:auto` på grid-wrapper i stedet for `justify-content`
v1.60.1 April 2026
▼
  • `center="yes"` bruger nu `auto-fit` med fast `card_width` i stedet for `1fr` enheder
  • Kortene fylder ikke rækken ud — `columns` styrer max antal per linje
v1.60.0 April 2026
▼
  • Ensomme kort centreres med `justify-items: center` på grid
  • Det 5. kort i et 4-kolonne-grid centreres automatisk i stedet for at sidde til venstre
v1.59.9 April 2026
▼
  • Grid `justify-items: center` centrerer hvert kort inden i sin celle
  • Kort får `max-width: card_width` så de ikke fylder cellen ud
v1.59.8 April 2026
▼
  • Al layout-styling sat som inline style direkte på wrapper-element
  • Temaets CSS kan ikke overskrive inline styles
v1.59.7 April 2026
▼
  • `center`-parameter evalueres med `strtolower(trim())` — mellemrum og store bogstaver ignoreres
  • Layout-styles samlet til én streng
v1.59.6 April 2026
▼
  • `center="yes"`: `grid-template-columns: repeat(N, Xpx)` sat som inline style direkte
v1.59.5 April 2026
▼
  • `center="yes"` parameter tilføjet til `[therapist_services]` og `[therapist_courses]`
  • Centrerer kortene i stedet for at strække til fuld bredde
v1.59.4 April 2026
▼
  • Forløb admin-side opdelt i tre faneblade: Produkter, Solgte forløb og Shortcode design
  • Identiske farveindstillinger som ydelserne
v1.59.3 April 2026
▼
  • Ydelseskatalog opdelt i to faneblade: Ydelser og Shortcode design
  • Shortcode design-fane: justering (venstre/center/højre), kortbaggrund, rammefarve, overskriftsfarve, tekstfarve, pillefarve, linkfarve
v1.59.2 April 2026
▼
  • "Book tid"-knap i shortcode redesignet som diskret tekstlink i guldfarve med tynd understregning
  • Ingen baggrund eller fyldt knap — passer bedre ind i kortlayoutet
v1.59.1 April 2026
▼
  • Felt "Vis på hjemmesiden" tilføjet på ydelser og forløb
  • Giver mulighed for at skjule en ydelse fra shortcode uden at deaktivere den i bookingformularen
  • Database: ny kolonne `show_on_website TINYINT(1) DEFAULT 1`
v1.59.0 April 2026
▼
  • Rettet: PHP castede `"38-cleanup"` (buffer-event ID) til `38` ved SQL-opslag
  • Buffer-event oprydningseventet matchede dermed hoved-eventet og de blokerede hinanden
  • `strpos()`-tjek tilføjet: IDs med `-cleanup` suffix behandles korrekt
v1.58.9 April 2026
▼
  • Rettet: Syntaksfejl i buffer-event funktioner — overflødig `}` i `tb_calendar_save_buffer_id`
v1.58.8 April 2026
▼
  • Rettet: `tb_calendar_dispatch_create()` returnerede ikke event ID — `return`-statement manglede
  • Buffer-event IDs gik tabt og kunne ikke slettes ved booking-aflysning
v1.58.7 April 2026
▼
  • Rettet: Brace-syntaksfejl i `tb_calendar_save_buffer_id` — overflødig `}` fra tidligere str_replace
v1.58.6 April 2026
▼
  • Database: seks nye kolonner til buffer-event IDs per booking
  • `google_prep_event_id`, `google_cleanup_event_id`: Google Calendar buffer-events
  • `ms_prep_event_id`, `ms_cleanup_event_id`: Microsoft 365 buffer-events
  • `caldav_prep_uid`, `caldav_cleanup_uid`: CalDAV buffer-events
  • Buffer-events slettes automatisk korrekt ved booking-sletning
v1.58.5 April 2026
▼
  • Standard gavekort-udløbstid ændret fra 1 år til 3 år (1095 dage)
  • Gælder gavekort-produktformular, manuel udstedelse og forløbsprodukter
v1.58.4 April 2026
▼
  • Rettet: Kalender-diagnostik hentede terapeut-ID fra `#tb-test-caldav` knap som er skjult ved Google Calendar
  • Skjulte HTML-elementer returnerer tom streng ved `.data()` — nu hentes ID fra korrekt kontekst
v1.58.3 April 2026
▼
  • Slot-generator snapper nu til nærmeste halve/hele time
  • Tilgængelighed der starter kl. 09:10 → første slot kl. 09:30
  • Starter kl. 09:00 → første slot kl. 09:00 (ingen ændring)
  • Eliminerer ulige tidspunkter som 09:10, 09:40, 10:10
v1.58.2 April 2026
▼
  • Buffer-events: separate kalenderaftaler oprettes for forberedelsestid og oprydningstid
  • Tre aftaler i kalenderen: "Forberedelse — Klientnavn" / Selve behandlingen / "Oprydning — Klientnavn"
  • Klientens tid vises præcist i kalenderen — buffer-tid er ikke "gemt" i hoved-eventet
  • Virker for CalDAV, Google Calendar og Microsoft 365
v1.58.1 April 2026
▼
  • Portal login-formular pakket i korrekt ``-tag med `action` og `method`
  • `autocomplete="current-password"` tilføjet til adgangskodefeltet
  • Browsere kan nu tilbyde at gemme og auto-udfylde adgangskoden (password vault-support)
v1.58.0 April 2026
▼
  • Rettet: Portal navigation dropdown manglede `display:none` basisregel — dropdown altid synlig
  • Rettet: PWA install-knap — `beforeinstallprompt`-event håndtering fundamentalt problem løst
v1.57.9 April 2026
▼
  • Rettet: Portal hamburger-menu mistede `align-items`, `justify-content` og `gap`
  • Disse egenskaber kræver `display:flex` — begge attributter nu korrekt sat
v1.57.8 April 2026
▼
  • Rettet: `tb_serve_pwa_sw` manglede afsluttende `}` — PHP-syntaksfejl
  • Automatisk brace-tjek tilføjet i byggeprocessen
v1.57.7 April 2026
▼
  • Rettet: PWA-installationsbanner altid synligt — `style="display:none"` og `style="display:flex"` var begge til stede
  • `display:flex` kom sidst og vandt altid; rettet til kun én display-regel
  • Rettet: iOS-installationsvejledning viste ikke korrekt betingelse
v1.57.6 April 2026
▼
  • GDPR-klientliste: tre-linje-layout med badges
  • Linje 1: Navn + samtykkestatus-badges (✓ Samtykke, ★ Forlænget)
  • Linje 2: E-mail og telefon
  • Linje 3: Opbevarings-info og handlingsknapper
v1.57.5 April 2026
▼
  • Portal ydelsesliste redesignet: toggle-switch, navn og beskrivelse på linje 1
  • Pris og varighed redigerbare inline direkte under ydelsesnavnet
  • Leveringstype vises som badge (Fysisk / Online / Telefon)
v1.57.4 April 2026
▼
  • PWA: service worker og manifest forbedringer
  • Android-installationsprompt mere robust
v1.57.3 April 2026
▼
  • PWA install-prompt forbedringer til Android Chrome
v1.57.2 April 2026
▼
  • Responsiv portal-navigation med hamburger-menu på mobil
  • Desktop: uændret vandret fanebjælke
  • Mobil: hamburger-knap viser navn på aktiv sektion og åbner dropdown-menu
v1.57.1 April 2026
▼
  • PWA `beforeinstallprompt` event håndtering
v1.57.0 April 2026
▼
  • PWA-support tilføjet til terapeutportalen
  • Service Worker registreres via `/tb-portal-sw.js` endpoint med `Service-Worker-Allowed: /` header
  • App-manifest genereres dynamisk
  • Android/Chrome: automatisk install-banner
  • iOS/Safari: manuel vejledning (Del → Føj til hjemskærm)
v1.56.8 April 2026
▼
  • Portal login-formular omskrevet til lodret enkeltkolonne-layout
  • Max 420px bredde, label over felt
  • Bruger `.form-group` CSS — konsistent med resten af portalen
v1.56.7 April 2026
▼
  • Rettet: Portal bookingoversigt viste max 200 bookinger — grænse fjernet
  • Rettet: Datofiltrering brugte serverens PHP-tidszone i stedet for plugin-tidszonen
  • Ny feature: "Opret booking"-knap i terapeutportalen med samme modal som admin
v1.56.6 April 2026
▼
  • Rettet: Portal bookingoversigt viste max 200 bookinger
  • Rettet: Datofiltrering brugte serverens tidszone
  • Ny: Dato-intervalfilter (Fra / Til) i portalen
  • Ny: Opret booking fra portalen
v1.56.5 April 2026
▼
  • Opret booking direkte fra admin-oversigten via modal
  • Vælg terapeut → ydelser hentes automatisk → standardpris udfyldes
  • Vælg dato og ledigt tidspunkt fra kalenderens ledige slots
  • Valgfri bekræftelsesemail til klienten ved manuel oprettelse
v1.56.4 April 2026
▼
  • Microsoft 365: `startDateTime`/`endDateTime` konverteres til UTC med Z-suffix (`2026-04-01T22:00:00Z`)
  • Microsoft Graph API afviser offset-format (+02:00) — kræver UTC
  • Tidszone-rettelse der eliminerede "forkert tid i Microsoft kalender"
v1.56.3 April 2026
▼
  • Rettet: `calendar_type` kolonne tillod kun `ENUM('caldav','google')` — MySQL afviste `microsoft` lydløst
  • ALTER TABLE kører automatisk ved opdatering og tilføjer `microsoft` til ENUM
v1.56.2 April 2026
▼
  • Microsoft 365 OAuth2 token-fornyelse via refresh token
  • Event-oprettelse og -sletning via Graph API
v1.56.1 April 2026
▼
  • Rettet: Syntaksfejl fra forkert Python-indrykning — `ajax_test_zoom` metode
v1.56.0 April 2026
▼
  • Rettet: JavaScript regex i PHP-streng (`/error|fatal/i.test()`) crashede siden
  • Erstattet med `indexOf()` som er ren JavaScript uden PHP backslash-problemer
v1.55.9 April 2026
▼
  • PHP Error Log admin-side tilføjet under Bookinger-menuen
  • Viser plugin-relaterede fejl filtreret fra WordPress error_log
v1.55.8 April 2026
▼
  • Rettet: Microsoft Graph API modtog `2026-04-01T00:00:00+02:00` (offset) i stedet for UTC
  • `format('Y-m-d\TH:i:sP')` erstattet med korrekt UTC-konvertering
v1.55.7 April 2026
▼
  • Forbedret fejllogning for Microsoft 365 kalenderintegration
v1.55.6 April 2026
▼
  • Microsoft 365 redirect URI ændret til direkte PHP-fil for Azure-kompatibilitet
v1.55.5 April 2026
▼
  • CalDAV TZID-format: `DTSTART;TZID=Europe/Copenhagen:20260401T170000` (lokal tid med TZID)
  • OneCom's CalDAV-server fortolkede UTC Z-format forkert (viste 1-2 timer forkert)
  • Korrekt RFC 5545 format der virker på OneCom, iCloud, Nextcloud og Google CalDAV
v1.55.4 April 2026
▼
  • Rettet: Kritisk fejl ved aktivering — aktiveringshook kaldte ikke-eksisterende `tb_ms_register_rewrite()`
  • Husk: opdater redirect URI i Azure efter installation
v1.55.3 April 2026
▼
  • Microsoft 365: OAuth-forbindelsesknap bruger nu `data-url` attribut
  • Browseren dekoder HTML-entities automatisk fra data-attributter
  • Azure modtager nu korrekt URL uden `&` encoding
v1.55.2 April 2026
▼
  • Microsoft 365 OAuth debug-sektion tilføjet på terapeutprofil
v1.55.1 April 2026
▼
  • Tidszone-arkitektur: globale hjælperfunktioner `tb_get_timezone()`, `tb_local_to_timestamp()`, `tb_format_time()`
  • Alle kalendertyper bruger nu det samme tidszone-system
v1.55.0 April 2026
▼
  • Rettet: Microsoft 365 OAuth-knap — `esc_url()` og `esc_attr()` konverterede `&` til `&`
  • Azure modtog `&redirect_uri=...` i stedet for `&redirect_uri=...`
  • Løst med `json_encode()` i inline script-attribut
v1.54.9 April 2026
▼
  • Rettet: Azure afviste redirect_uri fordi URL-encoding ikke var korrekt
v1.54.8 April 2026
▼
  • Rettet: `esc_url()` fjernede parametre med specialtegn i scope-værdien
v1.54.7 April 2026
▼
  • Microsoft 365 OAuth: Azure viser altid konto-vælger (account_select prompt)
v1.54.6 April 2026
▼
  • Microsoft 365 OAuth: bruger `/common` tenant i stedet for organisationsspecifik endpoint
  • Understøtter nu både erhvervs- og personlige Microsoft-konti
v1.54.5 April 2026
▼
  • Microsoft 365 konfiguration: rettelse til redirect URI håndtering
v1.54.4 April 2026
▼
  • Microsoft 365: understøttelse af personlige Microsoft-konti i Azure app-registrering
v1.54.3 April 2026
▼
  • Microsoft 365 OAuth callback via WordPress-side (undgår query string i redirect URI)
  • Plugin opretter automatisk en skjult WordPress-side til OAuth callback
v1.54.2 April 2026
▼
  • Microsoft 365 OAuth callback via rewrite-regel
  • Plugin registrerer rewrite-regel og flusher permalinks ved aktivering
v1.54.1 April 2026
▼
  • Rettet: Azure afviste redirect URI med query string (`admin-post.php?action=...`)
  • Ny tilgang: ren URL uden query string
v1.54.0 April 2026
▼
  • Microsoft 365 / Outlook Calendar OAuth2 integration tilføjet
  • API-nøgler (Application Client ID, Client Secret) under Indstillinger
  • Forbind-knap på terapeutprofil
  • Event-oprettelse via Microsoft Graph API `/me/calendar/events`
v1.53.6 April 2026
▼
  • Rettet: `calendar_type` ENUM udvidet med `microsoft` værdi
  • Deaktivér og genaktivér pluginnet for at køre ALTER TABLE
v1.53.5 April 2026
▼
  • .ics kalenderinvitation til klient inkluderer nu LOCATION (Zoom-link), URL og DESCRIPTION med Zoom-link
  • Zoom-linket er klikbart i Apple Kalender og Google Kalender
v1.53.4 April 2026
▼
  • Rettet: `get_services` AJAX-handler inkluderede ikke `delivery_type` i svaret
  • JavaScript satte altid `delivery_type='physical'` og Zoom-møde blev aldrig oprettet
v1.53.3 April 2026
▼
  • Zoom-diagnostik forbedret med detaljeret fejlinformation
v1.53.2 April 2026
▼
  • CalDAV: OneCom-kompatibilitet — bruger TZID-format (lokal tid) i stedet for UTC Z-format
  • OneCom fortolker Z-suffix forkert og viser 1-2 timer forkert
v1.53.1 April 2026
▼
  • Zoom scope-krav dokumenteret og vejledning opdateret
v1.53.0 April 2026
▼
  • Telefonsamtale som tredje leveringstype på ydelser
  • Booking-flow viser info om at terapeuten ringer op
  • Bekræftelsesemail: "📞 Telefonsamtale"-boks
v1.52.8 April 2026
▼
  • Zoom test-knap opretter nu et rigtigt testmøde og sletter det straks igen
  • Bruger præcis de scopes der er tilføjet i Zoom Marketplace
v1.52.7 April 2026
▼
  • Zoom test-funktion bruger `/users/me/meetings` endpoint i stedet for `/users/me`
v1.52.5 April 2026
▼
  • Zoom scope-dokumentation opdateret: `meeting:write:admin`, `meeting:update:admin`, `meeting:delete:admin`
v1.52.4 April 2026
▼
  • Rettet: Zoom Client Secret-felt var `type="password"` — browsere sender tomme password-felter
  • Alle tre Zoom-felter ændret til `type="text"`
v1.52.2 April 2026
▼
  • Google Calendar diagnostik-log tilføjet på terapeutprofil — samme som CalDAV
  • Viser token-fornyelse, hentede begivenheder og fejl
v1.52.1 April 2026
▼
  • Rettet: OneCom CalDAV understøtter ikke `calendar-query` med `time-range` filter i REPORT
  • Ny tilgang: hent alle events for perioden og filtrer lokalt
v1.52.0 April 2026
▼
  • Rettet: CalDAV HTTP 422 fejl ved slot-opslag
  • CalDAV REPORT request format rettelse
v1.51.9 April 2026
▼
  • Rettet: Kritisk hotfix — kædet ternary-udtryk (`? : ? :`) crashede PHP 8
  • PHP 8 kræver parenteser: `(a ? b : c) ? d : e`
v1.51.8 April 2026
▼
  • CalDAV aktivitetslog udvidet med mere detaljeret information
v1.51.7 April 2026
▼
  • Forbedret fejllogning for CalDAV slot-opslag
v1.51.6 April 2026
▼
  • CalDAV cache: nye aftaler synlige inden for max 2 minutter (120 sekunders TTL)
  • Cache nødvendig for at undgå HTTP-kald ved hvert slot-opslag
v1.51.5 April 2026
▼
  • CalDAV forbedringer til VEVENT-parsing
v1.51.4 April 2026
▼
  • Rettet: Google Calendar OAuth token-fornyelse edge cases
v1.51.3 April 2026
▼
  • Rabatkoder: procentrabat og fast beløbsrabat
  • Kodes kan begrænses til specifikke ydelser eller terapeuter
v1.51.2 April 2026
▼
  • iCal URL-feed: terapeuter kan abonnere på deres bookinger som kalender-feed
v1.51.1 April 2026
▼
  • Google Calendar: diagnostik-panel med token-status og API-log
v1.51.0 Marts/April 2026
▼
  • Google Calendar OAuth 2.0 to-vejs integration
  • Terapeuten forbinder Google-konto via OAuth fra terapeutprofilen
  • Bookinger oprettes automatisk i Google Calendar
  • Slot-opslag tjekker Google Calendar for blokerede tider
  • Kalender-vælger: terapeuten vælger hvilken Google kalender der bruges
  • CalDAV to-vejs kalenderintegration (Nextcloud, iCloud, OneCom og andre)
  • GDPR-system: automatisk anonymisering 3 måneder efter seneste aktivitet
  • Klient-oversigt i admin med samtykkestyring
  • Forbedret terapeutportal med GDPR-fane
  • Minimum varselsperiode pr. ydelse (timer)
  • Slot-generering: snap til halve/hele timer

Klar til at komme i gang?

Download gratis og prøv det i din klinik i dag.

Vi hjælper gerne