=== Libre Bite – Restaurant POS, Kitchen Display (KDS) & QR Ordering for WooCommerce ===
Contributors: simon61
Donate link: https://github.com/simurech/libre-bite
Tags: woocommerce, restaurant, pos, ordering, food-delivery
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 8.1
Stable tag: 2.0.21
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Stress-free orders, happy guests, full tables — the WooCommerce plugin built for restaurants, take-aways, and cafés.

== Description ==

**More orders, less stress — Libre Bite turns WooCommerce into your restaurant's operational backbone.** No commission fees, no SaaS lock-in: your guests order online or at the table via QR code, pay with card, cash, or Twint, and your kitchen sees every order live on the board — all inside WordPress.

**Start for free. Upgrade only when you need more.**

---

= Free to Start =

All core features are available completely free of charge — no credit card, no trial period, no hidden limits.

A Pro subscription is only required for advanced features such as multi-location management, table ordering, optimised checkout, tipping, and pickup reminders. Pro plans are priced to be affordable — significantly cheaper than dedicated restaurant SaaS platforms.

**7-day free Pro trial — no payment required.**

---

= Built on WordPress & WooCommerce =

Libre Bite is a WordPress plugin. It extends WooCommerce — the proven e-commerce foundation used by millions of sites worldwide.

* **No new platform to learn** — manage everything inside your existing WordPress dashboard.
* **Your products stay WooCommerce products** — set them up once and they appear in the POS, checkout, and online shop automatically.
* **Use any WooCommerce-compatible payment gateway** — cash, card, Twint, Stripe, PayPal, or any other gateway you already have. Libre Bite charges **no transaction fees**.
* **Offline payments supported** — "Pay at pickup", "Pay at table", or any custom payment method via standard WooCommerce.

---

= For Whom Is Libre Bite? =

Libre Bite is built for **small and micro gastronomy businesses** — operations that want serious software without enterprise-level costs or delivery platform commissions.

* **Restaurants** — Take dine-in and take-away orders, keep the kitchen informed, delight guests with smooth service.
* **Take-Away & Fast Food** — Serve walk-ins fast with an integrated counter POS, accept card and Twint payments, no third-party fees.
* **Cafés & Bars** — Handle product extras, tips, and order flow without juggling multiple tools.
* **Multi-location businesses** — Run all branches from one WordPress installation, each with its own order board and POS (Pro).

---

= Modular by Design =

Only activate the features your business actually needs. Unused modules stay hidden — no cluttered menus, no unnecessary complexity.

---

= Core Features (Free) =

**Live Kanban Order Board (KDS)**
A real-time kitchen display that visualizes every incoming WooCommerce order as a card. Drag & drop cards between columns (New → Preparing → Ready → Completed) to update order statuses instantly — without reloading the page.

**Integrated Point of Sale (POS)**
A clear POS interface for walk-in customers. Add products to the order, accept payments — all without leaving WordPress.

**Location Management**
Create and manage branches, each with its own address, opening hours, and order routing. Works immediately for single-location businesses.

**Swiss 5-Cent Rounding**
Built-in support for the Swiss rounding rule (5-cent rounding). Indispensable for restaurants and retail in Switzerland.

**Pickup/Delivery Time Slots**
Customers choose a time slot for pickup or delivery directly during checkout. Relieve peak hours and better manage kitchen capacity.

**Product Add-ons & Extras**
Add configurable options to any WooCommerce product — sizes, sauces, toppings, preparation notes — with optional price markups.

**Modular Feature Control**
Only enable what your business really needs. Each module can be independently toggled on or off in the admin area.

**WooCommerce HPOS Compatible**
Fully tested with WooCommerce High-Performance Order Storage (HPOS). Safe for modern, high-traffic setups.

---

= Pro Features (Subscription required) =

**Table Ordering (QR Code)**
Generate a QR code for each table. Guests scan it and order directly — no address or pickup time fields required. Orders appear in the dashboard with the table name.

**Multi-Location Management**
Manage an unlimited number of branches. Each location gets its own Kanban board, POS configuration, and separate order flow — managed centrally via one WordPress installation.

**Optimized Checkout Flow**
A conversion-focused checkout process for gastronomy businesses — fewer steps, cleaner layout, mobile-first.

**Advanced Tipping System**
Customers can select percentage tip suggestions (e.g., 5%, 10%, 15%) or enter a custom amount. Tip amounts are saved per order and displayed in the dashboard.

**Automatic Pickup Reminders**
Automatic email reminders to customers X minutes before the scheduled pickup time. Fewer no-shows, better pickup experience.

**Nutritional Info & Allergen Labeling**
EU-compliant nutritional values and allergen declarations for every product. Displayed clearly on the product page and during checkout.

**Advanced Sound Notifications**
A browser signal tone when a new order arrives on the Kanban board. Configurable individually per location.

---

= Why Libre Bite? =

Delivery platforms take up to 30% commission. Dedicated restaurant SaaS tools charge monthly fees on top of that. Libre Bite is different: own your ordering system, pay no commissions, and keep every franc.

* **Commission-free ordering** — guests order directly on your website, no platform cut
* **No transaction fees** — ever
* **Twint, card, cash** — accept any payment WooCommerce supports
* **Swiss 5-cent rounding built in** — essential for CHF cash payments
* **QR code ordering at the table** — guests scan, choose, and pay in seconds (Pro)
* **Modular** — activate only what your business needs, nothing else
* **Your data stays yours** — in your own WordPress installation
* **Affordable Pro plans** — designed for small businesses, not enterprise budgets
* **7-day free Pro trial** — no payment required

---

= Works on Any Device =

Libre Bite works on any device — no app installation required. Use it with a mouse and keyboard on a desktop or laptop, or with touch input on a tablet. The Kanban order board, POS interface, and reservation dashboard are optimised for touch-first operation, making them well-suited for use on a tablet mounted at the counter or kitchen pass.

---

= How to Run Libre Bite =

**Option 1 — Extend your existing website**
Install Libre Bite directly into your existing WordPress/WooCommerce site. Any theme is compatible — no design changes required.

**Option 2 — Standalone installation (subdomain)**
Run Libre Bite as a dedicated installation on a subdomain, such as `order.myrestaurant.com` — completely independent from your main website, purpose-built for your gastronomy operation.

**Option 3 — Managed hosting by Libre Bite**
Libre Bite handles the complete setup: installation, configuration, hosting, and ongoing maintenance — from A to Z. Available as a paid service. Contact via GitHub.

---

= External Services =

This plugin uses **Freemius**, a third-party platform for managing licenses, subscriptions, and plugin updates for the Pro version.

During plugin activation, you can opt-in to data sharing with Freemius. Basic information about your website (WordPress version, PHP version, active plugins) is transmitted to Freemius to enable license validation and usage analysis. **Opt-in is completely optional.** All free core features work without opt-in.

* Freemius Privacy Policy: https://freemius.com/privacy/
* Freemius Terms of Service: https://freemius.com/terms/

No data is sent to Freemius if you skip or decline the opt-in during activation.

The Table Management feature (Pro) uses the **goQR.me API** (https://goqr.me/api/) to generate QR codes for table ordering links. The QR code URL is transmitted to generate the corresponding image. No personal or order data is sent.

* goQR.me API: https://goqr.me/api/
* goQR.me Privacy Policy: https://goqr.me/privacy-policy/

== Installation ==

1. Upload the plugin folder to the `/wp-content/plugins/libre-bite` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the **Plugins** screen in WordPress.
3. Make sure **WooCommerce** is installed and active — Libre Bite requires WooCommerce.
4. Navigate to **Libre Bite** in the admin menu to configure locations, enable modules, and set up the POS and Kanban board.

== Frequently Asked Questions ==

= Is WooCommerce mandatory? =

Yes. Libre Bite is a WooCommerce extension. WooCommerce must be installed and active for Libre Bite to work. WooCommerce 8.0 or later is recommended.

= Which payment methods are supported? =

Libre Bite uses WooCommerce's standard payment system. Any WooCommerce-compatible payment gateway works — including Stripe, PayPal, Twint, cash on pickup, card at counter, and more. Libre Bite charges **no transaction fees**. You pay only for your payment gateway (if any) and the optional Pro subscription.

= Can customers pay in cash or at the counter? =

Yes. WooCommerce includes offline payment methods such as "Cash on Delivery" or "Pay in Person". You can rename and configure these freely — for example "Pay at pickup" or "Pay at the counter".

= Is the plugin compatible with WooCommerce HPOS? =

Yes. Libre Bite is fully compatible with WooCommerce High-Performance Order Storage (HPOS). It has been tested with both legacy post-based storage and the new Custom Order Tables.

= Can I manage multiple restaurant locations? =

Multi-location management is included in the Pro version. The free version supports a single location with full configuration of address, opening hours, and order routing.

= What is Swiss 5-Cent Rounding? =

In Switzerland, cash payments are rounded to the nearest 5 cents as 1- and 2-cent coins are no longer in circulation. Libre Bite automatically applies this rounding rule at checkout — useful for Swiss restaurants, cafés, and take-away businesses.

= Does the POS system work offline? =

The integrated POS system requires an active WordPress/WooCommerce session and an internet connection. It is a browser-based interface that currently does not support offline mode.

= Does Libre Bite share my data with third parties? =

Libre Bite uses Freemius for license management and delivery of Pro features. Data is only transmitted to Freemius if you explicitly opt-in during activation. No order, customer, or product data is transmitted — only basic website environment information (PHP version, WP version, plugin list). For more details, see the Freemius Privacy Policy: https://freemius.com/privacy/

= What are the minimum requirements? =

* WordPress 6.0 or higher
* WooCommerce 8.0 or higher
* PHP 7.4 or higher (PHP 8.1+ recommended)
* A modern browser for Kanban board and POS interface

= Is Libre Bite available in multiple languages? =

The plugin uses standard WordPress i18n functions and can be translated via .pot files or community translations on translate.wordpress.org. The default language is English.

== Screenshots ==

1. **Kanban Order Board** — Real-time order management for kitchen staff. Drag & drop cards to update status.
2. **POS Interface** — Integrated Point of Sale for walk-in customers and counter orders.
3. **Location Settings** — Configure branch address, opening hours, and order routing.
4. **Checkout Time Slots** — Customers choose their pickup time slot directly during checkout.
5. **Product Add-ons** — Configurable extras and options for each menu item.
6. **Module Settings** — Toggle individual features on or off depending on business needs.

== Changelog ==

= 2.0.21 =
* Update: Freemius SDK updated to version 2.13.2.

= 2.0.20 =
* Fix: Order creation time in the orders list now always displays in the WordPress site timezone, regardless of the browser's timezone setting.

= 2.0.19 =
* Fix: 5-cent rounding now applies to the final cart total after coupon discounts, not to the pre-discount subtotal.
* Fix: Statistics page now correctly shows orders for the current day instead of always showing zero.
* Improvement: Order creation time is now displayed below the date in the WooCommerce orders list.

= 2.0.18 =
* Fix: Sound notification settings — Free users no longer see the media library picker, which is a Pro-only feature. Free users see a preview of the default sound instead. The built-in notification sound is now always used for Free installations, regardless of any previously saved empty value.

= 2.0.17 =
* Fix: Duplicate AJAX handler for lbite_pos_get_products removed from the admin class. The admin handler was registered first and took precedence over the POS module handler, causing location-based product filtering to be bypassed entirely.
* Security: Added a honeypot field to the public reservation form to block automated spam submissions.

= 2.0.16 =
* Improvement: Sound Notifications is now a free feature — no Pro subscription required to hear new order alerts in the Order Overview.
* Improvement: Roles & Menus settings — added a tip to assign a location to each Libre Bite Staff user so they only see orders relevant to their location.

= 2.0.15 =
* Fix: Fatal error on every admin page in the free version caused by an unguarded premium-only method registration on the admin_init hook. The backend was completely inaccessible after installing the free version.

= 2.0.14 =
* Fix: Cart total now stays the same for the customer regardless of which tax class is applied (takeaway vs. dine-in). WooCommerce's internal 'unfiltered' tax class lookup was bypassing the rate switch and recalculating a different gross price.
* Fix: Email field in optimized checkout now correctly appears and stays visible after WooCommerce refreshes the payment section.

= 2.0.13 =
* Fix: Product pages no longer show a recalculated price when Multiple Tax Rates is active — the tax class filter now only applies in cart/checkout/AJAX contexts.
* Improvement: Optimized checkout — email field now appears after the payment method selection, not before. Customers only see it when their chosen payment method requires an email.
* Improvement: Optimized checkout — which payment methods require an email address is now configurable in Settings → Checkout (instead of being hardcoded).
* Fix: Location selector — location image is now correctly shown after selecting a location (tiles layout).
* Improvement: Thank-you page — detail boxes are now white with a colored left border instead of gray fill.
* Improvement: Thank-you page — for dine-in orders the pickup box is replaced by a service/table box showing the table name.

= 2.0.12 =
* Improvement: Order dashboard — table badge now shows actual table name (e.g. "Tisch 3") instead of generic "Tisch".
* Improvement: Order dashboard — card footer now shows order creation time alongside order number and customer name.
* Fix: When a table QR code is scanned, the session service type is now explicitly set to "dine_in" so VAT and checkout defaults are correct from the start.
* Fix: Table QR code box moved to the sidebar in the table edit screen for better overview.

= 2.0.11 =
* Fix: Optimized checkout — order type (takeaway / eat here) no longer pre-selected; customer must make an explicit choice. JS and server-side validation added.
* Fix: Optimized checkout — radio buttons now have proper spacing and separator from the location block above.
* Fix: Optimized checkout — table dropdown now fully visible and correctly styled.
* Improvement: Table dropdown in checkout now uses natural number sorting by default (Tisch 1, 2, 10, 11 instead of 1, 10, 11, 2).
* Improvement: New setting in Tables tab: control table sort order (natural or menu order).
* Improvement: "Please select a location and pickup time" replaced with more neutral wording.
* Translations: All 5 locales updated (1399 strings).

= 2.0.10 =
* Fix: Optimized checkout — Order Type selector is now rendered inside the "Location & Pickup Time" box instead of a separate second box below it.
* Improvement: "Swiss VAT Switching" feature renamed to "Multiple Tax Rates" for better clarity and international applicability; tax class descriptions no longer reference Swiss-specific rates.
* Translations: All 5 locales updated.

= 2.0.9 =
* Improvement: Optimized checkout — Order Type selector ("To take away" / "Eat here") is now integrated into the location info box at the top of the form.
* Improvement: Optimized checkout — Table field replaced by a dropdown of configured tables; falls back to text input if no tables are set up for the location.
* Improvement: Pickup time in info box is hidden for dine-in orders (not applicable).
* Improvement: POS settings — "Default Order Type" is now visible when Table Management is active, not only when Swiss VAT Switching is enabled. Added link to Prices & Taxes settings when relevant.
* Translations: All 5 locales updated to 1395 translated strings (0 untranslated).

= 2.0.8 =
* Security: Removed developer override constant that bypassed license verification for premium features.
* Fix: Settings — premium feature toggles can now be saved without erroneously being reset; license enforcement happens exclusively at runtime.

= 2.0.7 =
* Fix: Settings — premium features (e.g. Order Type Selection) can now be saved correctly when using the developer override constant.
* Fix: POS — Table selector is now hidden for Takeaway orders and only appears when Dine-in is selected; automatically resets to "No table" after each order.
* Improvement: POS — Order Type selector (Takeaway / Dine-in) now appears whenever Table Management or Swiss VAT Switching is active, not only when Swiss VAT is enabled.

= 2.0.6 =
* Fix: Statistics — CSV export no longer contains HTML; output buffers are now cleared before headers are sent.
* Fix: Statistics — translation strings for new columns (Top Products, By Quantity, By Revenue, etc.) now correctly loaded in all locales.
* Fix: Optimized checkout — Order Type selector (Takeaway / Dine-in) is now visible; rendered directly in the checkout form with a summary in the info box.

= 2.0.5 =
* Feature: Statistics — extended reporting with top products by quantity and revenue, add-on breakdown with product combos, payment method share bars, and CSV export.
* UI: Table Plan and Reservations pages now show a Beta badge in the page title.
* Roadmap: fr_CH and it_CH translation entries added; Barcode-Scanning removed.

= 2.0.4 =
* Feature: Order Type Selection — customers can now choose Takeaway or Dine-in directly in the checkout form (Pro). When Swiss VAT Switching is active, the selection also controls which tax rate applies. With the Table module enabled, Dine-in reveals an optional table number field.
* Feature: POS — order type indicator (Takeaway / Dine-in) is now shown in the cart box below the total.
* Feature: POS settings — new option to configure the default order type (Takeaway or Dine-in) pre-selected on page load; selection persists across automatic page refreshes via localStorage.
* Fix: GitHub README — logo path corrected.

= 2.0.3 =
* Fix: Swiss VAT — tax class is now explicitly set on the order line item during checkout, ensuring calculate_totals() uses the correct rate (e.g. 2.6%) and the order tax breakdown displays the right rate instead of the original standard rate.
* Fix: Swiss VAT now also applies to product variations (woocommerce_product_variation_get_tax_class hook added).
* Fix: Statistics tile on the overview page now links to the correct URL (/wp-admin/admin.php?page=lbite-statistics).
* Fix: Completed orders loaded via "Load more" now remain visible during automatic dashboard refresh instead of disappearing.
* Feature: Statistics page — added location selector dropdown; admin can filter by location; default period changed from "Today" to "Last 7 Days".
* Feature: Order cards in the Kanban board now show a "Takeaway" badge for non-table orders alongside the existing "Sofort/Vorbestellung" and payment method chips.

= 2.0.2 =
* Fix: Swiss VAT switching now correctly preserves the gross price for the customer; previously, wc_get_price_excluding_tax() bypassed the tax-class filter and stored the net at the base rate, causing a price discrepancy after calculate_totals() applied the target rate. Affects POS orders, frontend checkout, and add-on fee items.

= 2.0.1 =
* Fix: Add-ons now appear as separate line items in WooCommerce orders (POS and frontend); the product price is no longer inflated by the add-on amount.
* Fix: POS orders no longer inherit scheduled pickup times from previous frontend test sessions; the pickup time meta is explicitly cleared on every POS order.
* Fix: Payment method selected in POS is now visible in the Kanban board and in the statistics breakdown.
* Feature: New "Prices & Taxes" settings tab — price rounding and Swiss VAT switching settings moved from the Checkout tab; added a direct link to WooCommerce Tax Settings.

= 2.0.0 =
* Fix: POS add-on prices are now correctly included in the order total for both simple and variable products; validation now correctly uses the parent product ID when a variation is selected.
* Fix: Swiss VAT filter now correctly applies the WooCommerce standard tax class (empty string) when configured as the target class for takeaway or dine-in orders. Re-save Settings → Checkout after updating.

= 1.6.2 =
* Fix: Swiss VAT tax class selection — standard tax class was incorrectly saved as 'standard' instead of '' (empty string) as required by WooCommerce; both dropdowns corrected. Re-save Settings → Checkout after updating.
* Fix: POS add-on prices are now correctly included in the order total; option IDs are validated server-side against assigned product options.
* Fix: Order item meta key for add-ons renamed from 'Konfiguration' to stable key 'Add-on'; item note meta key is no longer locale-dependent.

= 1.6.1 =
* Fix: POS order type selector (Takeaway / Dine-in) for Swiss VAT now appears correctly when the feature is enabled — the redundant premium check in the template has been removed.
* Fix: Two untranslated strings in the table settings panel (de_CH, de_CH_informal, de_DE, de_DE_formal, de_AT).
* Update: Minimum PHP version raised to 8.1; tested up to WordPress 7.0.

= 1.6.0 =
* Fix: Fullscreen mode in POS now works on iPad Safari (pseudo-fullscreen via CSS fallback when the Fullscreen API is unavailable) and auto-restores after Android system interruptions.
* Feature: "Mark as unavailable" dialog in POS — when toggling a product to out-of-stock, staff can now choose between "Today only" (auto-resets after midnight) and "Until further notice".
* Feature: Per-location timeslot interval — the pickup slot interval can now be set individually per location (overrides the global default; leave blank to inherit).
* Feature: Item notes in POS (Settings → Products) — staff can add a short note to individual cart items; notes appear in the order detail view.
* Feature: Item notes in online checkout (Settings → Products) — customers can add a note to individual cart items; notes appear in order details.
* Feature (Pro): Swiss VAT switching (Settings → Checkout) — automatically applies a configurable tax class for takeaway vs. dine-in (table) orders on both the frontend checkout and POS.

= 1.5.0 =
* Feature: Feature toggles moved from a central "Features" tab into each thematic settings tab — every functional area now starts with its own master toggle.
* Feature: Manager role (Pro) — new `lbite_manager` role between Staff and Admin; assign managers to specific locations via Settings → Roles & Menus.
* Feature: Location column and filter dropdown added to the WooCommerce order list for quick filtering by location.
* Feature: Statistics page — revenue, order count, and average order value per location and time period (average order value, top 5 products).
* Feature: Branding tab expanded with color presets (6 themes) and a live color preview.
* Feature: Per-location time overrides — preparation time, slot buffer start/end can now be set individually per location.
* Feature: Admin dashboard replaced with a dynamic tile grid that adapts to active features and user role.
* Improvement: Dead toggles removed (8 unused feature flags that had no effect on plugin behaviour).
* Improvement: Pro feature values are now force-blocked on the server on all save paths — Pro options cannot be enabled without a valid license.
* Improvement: All settings tab templates refactored; branding, statistics, roles, and notifications each have a dedicated tab.
* Improvement: Reservations feature is now independent of Table Ordering — each can be enabled separately.
* Improvement: Help documentation updated throughout to reflect the new tab structure and new features.
* Improvement: Master-toggle checkboxes now show an "Enable" label.
* Improvement: POS payment method icons configurable in Settings.
* Fix: Master-toggles in all settings tabs now save correctly via POST form (previously relied on a missing AJAX handler).
* Fix: Tables and Reservations Pro templates (tables__premium_only.php, reservations__premium_only.php) created.
* Fix: Branding live preview header and colour mapping corrected.
* Fix: Statistics prices rendered as HTML (wc_price output was being escaped).
* Fix: Location selector no longer shows "Invalid location" when multiple shortcode instances are on the same page.
* All five translation files (de_CH, de_CH_informal, de_DE, de_DE_formal, de_AT) updated.
* Tested with WordPress 7.0.

= 1.4.8 =
* Fix: POS modal now uses CSS Small Viewport Height (svh) so the footer button stays fully visible on iPad Safari when the tab bar is shown.
* Improvement: POS add-on options now display in a two-column grid, matching the layout of variant options.
* Improvement: POS product order now follows the WooCommerce menu order (same as the frontend shop) with A–Z as a tiebreaker.
* Improvement: POS page automatically reloads after 8 hours when the tab regains focus, preventing stale data and expired nonces.

= 1.4.7 =
* Fix: POS modal now clears the admin toolbar on tablets — top margin adjusted to prevent the "Add to Cart" button from being hidden behind the WordPress admin bar.
* Fix: Product add-ons in the POS modal are now grouped under a single "Add-ons" heading instead of showing each option name as both a group title and a choice label.
* Improvement: POS variant options now display in a two-column grid on wider screens for a more compact layout.

= 1.4.6 =
* Fix: Opening hours on location tiles and banner now open in a lightbox instead of expanding inline; closes on backdrop click or Escape key.
* Fix: Banner view location cards now show border and shadow consistent with tile cards.
* Fix: "Show opening hours" button no longer shows a theme-injected hover background outside the text area.
* Fix: `align="left"` shortcode parameter now correctly aligns tiles in single-location mode.
* Improvement: Location tile images now use `srcset` and `object-fit: cover` for sharper display on all screen sizes and orientations.

= 1.4.5 =
* Fix: Prevent standby and sound notifications in the Order Overview are now saved per browser via localStorage; both settings default to active and persist across page reloads.
* Fix: POS variant and add-on popup is now more compact; the "Add to Cart" button is always visible without scrolling, including on tablets.
* Feature: Assigned location per staff user — admins can lock a staff account to a specific location via the user profile; the location is pre-selected and cannot be changed in POS and Order Overview.
* Feature: Staff menu simplified — the Dashboard overview page is now hidden for staff accounts; staff land directly on the Order Overview.

= 1.4.4 =
* Feature: Opening hours popup on location tiles – "Show opening hours" link opens a compact weekly table directly within the tile.
* Fix: Removed non-functional "Admin Email" toggle from feature settings – WooCommerce handles order notification emails natively.
* Fix: Pro features in the Locations and Products groups are now always listed first.
* Fix: Added Pro badge to Sound Notifications and Pickup Reminders in help documentation; added WP-Cron note for reminders.
* Translations: New strings for opening hours popup and WP-Cron note added to all five language variants.

= 1.4.3 =
* Fix: Email address in the optimized checkout is now a real required field for online payments (e.g. Twint) – prevents double submission and eliminates invalid placeholder addresses.

= 1.4.2 =
* Fix: Removed drag & drop from the order board – prevents scroll conflicts and accidental actions on touch devices.
* Fix: Wake lock checkbox in POS moved from header to location bar (consistent with order board).
* Fix: Wake lock on Android/Samsung is now more reliable – automatically re-requested after tab and app switches.
* Fix: Updated outdated drag-and-drop and status references in the help documentation (3-column Kanban).
* Translations: Missing strings added to all five language variants (de_CH, de_CH_informal, de_DE, de_DE_formal, de_AT).

= 1.4.1 =
* Fix: POS coupon discount now correctly displayed in the checkout view.
* Fix: 5-cent rounding now also applied in the POS cart.
* Fix: Stock toggle now saves changes correctly, including for variable products.
* Fix: Staff users can now cancel orders (lbite_manage_orders capability).
* Fix: Missing "Discount:" translation added to all language packages.

= 1.4.0 =
* Feature: POS orders are always immediate (never scheduled pre-orders).
* Feature: POS screen wake lock to prevent standby (same as Kanban board).
* Feature: POS coupon field – apply WooCommerce coupons directly to orders.
* Feature: POS stock toggle – long-press a product to switch between in stock / out of stock.
* Feature: Order board reduced to 3 columns (Pre-orders, Preparing now, Completed).
* Feature: Compact Kanban card layout – items more prominent, more cards visible simultaneously.
* Fix: Staff users are no longer redirected away from the WordPress backend by WooCommerce.
* Fix: QR code links with location parameters now redirect correctly to the shop.

= 1.3.10 =
* Fix: Order cancellation via the order board no longer creates a false WooCommerce refund entry for offline gateways (BACS, COD); online gateways (Stripe, Twint) still receive an automatic refund.
* Fix: Removed blue left border on selected location box in checkout.
* Fix: Corrected "Your Email" / "Support Email" translation in de_CH_informal and de_DE_formal.
* Improvement: Product options are now labelled "Add-ons" in all German translations.

= 1.3.9 =
* Fix: Pre-orders in the Kanban board can now always be cancelled and manually edited, regardless of the dim setting.
* Feature: New "Dim pre-orders" setting (separate from "Show pre-orders") – both options independently configurable.
* Fix: "Show/dim pre-orders" settings are now correctly persisted after saving (checkbox state was always reset to enabled).
* Fix: Missing JS string loadMoreError now correctly loaded from translations.
* Fix: Incorrect translation for "Show future pre-orders" corrected in de_CH_informal and de_DE_formal.
* Translations: New strings for pre-order settings added to all languages.

= 1.3.8 =
* Feature: "No tip" button in checkout is now configurable in the backend (Settings → Tipping).
* Fix: Translations for de_CH_informal and de_DE_formal completed (holidays, fullscreen, receipt, slot buffer etc. were still in English).
* Fix: Removed fuzzy flags from all language files – affected strings (e.g. tip options) now display correctly translated.

= 1.3.7 =
* Fix: Receipt sending from the Kanban board and WooCommerce order view now works correctly, regardless of whether the optimized checkout is active (AJAX endpoint was registered too narrowly).
* Fix: Order cancellation now correctly triggers a gateway refund – the refund API is called reliably before the status change.
* Translations: Missing string in location help text added to all languages.

= 1.3.6 =
* Fix: Kanban board no longer shows orders with "pending payment" status – only paid orders (processing, on-hold) are displayed.
* Fix: Scheduled orders are only automatically moved to "Preparing" when they are paid.
* Feature: Payment confirmation polling as a fallback for Twint and similar gateways – the browser automatically redirects to the order confirmation page once payment is server-side confirmed.

= 1.3.5 =
* Fix: Banner layout of the location selector now responds correctly to clicks (missing JavaScript initialization added).
* Fix: "Order here" button in banner layout is no longer unnecessarily wide.
* Fix: Receipt email button in the Kanban board now works correctly (nonce error resolved).
* Fix: Optimized checkout now calls woocommerce_after_checkout_form – Twint popup opens correctly again.
* Improvement: Location selector documentation extended with banner layout and align parameter.
* Translations: New strings for location documentation and tip title added to all languages.

= 1.3.4 =
* Feature: [lbite_location_selector] shortcode now supports the align="left|center|right" parameter for horizontal alignment.
* Feature: [lbite_location_selector] shortcode now supports style="banner" layout – wide 2-column card with image left, details right, 24px rounded corners, and a semi-transparent background.

= 1.3.3 =
* Fix: Deep-link parameter ?lbite_location=ID is now correctly processed and sets the session independently of the table ordering feature.
* Fix: Location selector shortcode now recognizes the ?lbite_location=ID parameter (in addition to the previous ?location=ID).
* Feature: QR code metabox on locations now allows pre-selecting the order type (Immediate / Pre-order).
* Docs: Help documentation for URL parameters updated; correct parameter is ?lbite_location=ID.

= 1.3.2 =
* Fix: CSS box-sizing and height overrides for date/time input fields (theme compatibility).
* Fix: Branding color variables now fully applied across all CSS files; new --lbite-color-primary-bg variable.
* Fix: Reservation AJAX handlers now check if the reservations feature is enabled.
* Fix: POS order creation now clears the order badge transient immediately.
* Fix: Hardcoded German strings in pos.js and dashboard.js replaced with localizable variables.
* Fix: Name input field contrast in optimized checkout (white on white background).
* Fix: WooCommerce login toggle now appears in optimized checkout for guests.
* Fix: External payment providers (Twint, Stripe etc.) no longer receive a placeholder email; an email field appears when needed.
* Fix: Receipt email button now shown for all guest orders on the thank-you page, regardless of payment method.
* Fix: Admin receipt metabox shows an email input for POS/guest orders and allows resending.
* Fix: Kanban receipt button added to every order card; supports orders without a stored email address.
* Fix: Kanban future order filtering (lbite_show_future_orders) now works correctly; is_future calculated independently of feature flag; dimming controlled by futureDimmingEnabled.
* Fix: Cancel button in Kanban board is now solid red with a white ✕; removed emoji from "Start preparation" button.
* Improvement: All features are now enabled by default on fresh installations.

= 1.3.1 =
* Fix: Three premium asset files (checkout-tip.js, checkout-optimized-receipt.js, thankyou-optimized.css) were incorrectly included in the free version; added to @fs_premium_only.
* Fix: Table Ordering settings section now shows a Pro badge and is disabled for free users.
* Fix: Inline style attributes in templates now correctly use esc_attr() as per WordPress coding standards.
* Fix: Corrected wrong help reference "Settings → Dashboard" to "Settings → Order Overview".
* Improvement: Timeslot calculation results are now cached (5 min transient) for future dates, improving checkout performance.
* Improvement: Help section updated with documentation for two-window opening hours, slot buffers, dimmed future pre-orders, and receipt email.
* Improvement: [lbite_reservation_form] shortcode documented on the Documentation page (Pro).
* Improvement: Completed German translations (de_CH/de_DE/de_AT) for all v1.3.0 feature strings.

= 1.3.0 =
* Feature: Opening hours now support two time windows per day (e.g. lunch + dinner service).
* Feature: Holidays management – define closures or custom hours per date, assignable to all or specific locations.
* Feature (Pro): Slot buffers – configure the earliest first and latest last bookable time slot per day.
* Feature (Pro): Future pre-orders are now dimmed and non-draggable in the Kanban board until within preparation window.
* Feature (Pro): Optimized Checkout no longer asks for a receipt – print and email buttons now appear at the top of the thank-you page.
* Feature (Pro): Admins can re-send the receipt email directly from the order detail page via a metabox button.

= 1.2.9 =
* Fix: Optimized Checkout now shows a warning when the WooCommerce Checkout Block is used instead of the classic shortcode.
* Improvement: Added a note to the Checkout settings and the Help section explaining that the optimized checkout requires the [woocommerce_checkout] shortcode.

= 1.2.8 =
* Maintenance: Updated Freemius SDK to version 2.13.1.

= 1.2.7 =
* Fix: HPOS compatibility – order meta now stored via HPOS API ($order->update_meta_data / $order->get_meta) instead of post meta functions.
* Fix: Capability checks now use plugin-specific capabilities (lbite_use_pos, lbite_view_dashboard) instead of generic edit_posts.
* Fix: Locations menu is now always visible – at least one location is required for POS and order overview.
* Fix: Free plan is now limited to 1 published location; attempting to publish a second one keeps it as draft and shows an upgrade notice.
* Fix: Removed orphaned onboarding assets and broken "Restart Setup" button in Help page.
* Fix: All hardcoded German strings in dashboard.js and pos.js replaced with localizable strings via wp_localize_script.
* New: Added de_CH_informal (informal Swiss German) and de_DE_formal (formal German) translation variants.

= 1.2.6 =
* Improvement: All plugin strings switched to English (WordPress i18n standard).
* New: Swiss German translation (de_CH) now bundled with the plugin.

= 1.2.5 =
* Fix: Timezone error in Kanban sorting and auto status change resolved – strtotime() replaced by lbite_local_time_to_timestamp().
* Fix: Display error "Last modified" in order meta box corrected.
* Fix: Today's order count in the dashboard widget was incorrect when server and WordPress timezones differed.
* Fix: DateTime::createFromFormat() in checkout-location-time.php now uses DateTimeImmutable with wp_timezone().
* Improvement: Product options in the cart are now displayed as a single grouped "Options" entry instead of separate lines per selection.

= 1.2.4 =
* Fix: Timezone error in checkout confirmation, Kanban board and emails resolved – local time strings now correctly converted to Unix timestamps using lbite_local_time_to_timestamp().
* Fix: Timezone error in POS orders resolved (same root cause as above).
* Fix: Time selection fields in checkout: text was cut off on iOS/Safari – line-height and height: auto added.

= 1.2.3 =
* Improvement: Capability documentation in class-roles.php extended – all lbite_ capabilities annotated with inline comments.
* Improvement: phpcs:ignore comments supplemented with explicit justifications.

= 1.2.2 =
* Fix: @fs_premium_only header extended to cover the tables module and all related assets – correctly excluded from the Freemius-generated free version.

= 1.2.1 =
* Fix: Freemius deployment strategy corrected – premium code properly marked with @fs_premium_only header and is__premium_only() guards.
* Fix: Inline style and script tags in class-admin.php extracted to enqueued files.
* Fix: sanitize_admin_settings() implemented – all fields sanitized with appropriate WordPress functions.
* Fix: add_tip_fee() now explicitly verifies the WooCommerce nonce and extracts only required $_POST fields.

= 1.2.0 =
* Feature: Reservation dashboard – new day view with location dropdown, date navigation, status badges, and direct table assignment.
* Improvement: Reservation board refresh interval configurable in settings (default: 60 seconds).
* Improvement: Notification badge in the backend menu now links to the reservation board.
* Improvement: Device compatibility and operation models documented in plugin description.

= 1.1.9 =
* Improvement: Plugin description rewritten to focus on benefits rather than feature lists.
* Improvement: SEO keywords for Swiss gastronomy added (Twint, QR code ordering, 5-cent rounding, commission-free).
* Improvement: Tags on WP.org optimised.

= 1.1.8 =
* Feature: Notification badge for pending reservations added to the backend menu.

= 1.1.7 =
* Feature: Notification counter in backend menu shows the number of incoming orders.
* Feature: Print button on the order confirmation page for printing or saving as PDF.
* Improvement: "Activate order board" moved into the "Order System" card.
* Improvement: "Help & Support" added to dashboard quick access.

= 1.1.6 =
* Fix: PHP warning "Undefined property: WC_Order_Item_Fee::$total_tax" on the order confirmation page resolved.
* Fix: Payment method now displayed as its own box on the order confirmation page.
* Fix: Pre-orders now show date and time in the Kanban board (not just the time).
* Fix: Orders in the Kanban board are sorted by urgency (immediate: creation time, pre-order: pickup time).
* Fix: "Reservations" now appears in the backend menu under "Table Plan" instead of at the top.
* Fix: Reservation form no longer shows table selection – table assignment is handled by staff in the backend.
* Fix: Immediate orders are now blocked when the selected location is currently closed.
* Fix: Status badge on the location overview now shows the correct opening status (more robust time comparison).
* Fix: Nutritional info table on the product detail page now has correct horizontal padding.
* Improvement: "Product Options" is now listed under WooCommerce → Products.
* Improvement: Help section extended with a tab and content for "Reservations".

= 1.1.5 =
* Performance: POS product data cached for 1 hour via transient, invalidated on product and location save.
* Performance: Location colors cached via transient, invalidated on location save.
* Performance: Admin settings JS now loaded only on the settings page.
* Improvement: Default dashboard refresh interval increased from 30s to 45s for new installations.

= 1.1.4 =
* Feature: Visual floor plan — drag-and-drop canvas per location with shape/size controls and live table status.
* Feature: Table reservations — frontend form via shortcode [lbite_reservation_form], email notifications, and admin management view.
* Feature: POS table selector shows live occupancy status (free/occupied) for each table.
* Improvement: Floor plan link moved under Tables in admin menu.
* Improvement: Help section updated with floor plan documentation.
* Fix: Tables without saved order meta are now correctly shown in the floor plan.

= 1.1.3 =
* Feature: Location colors — color-coded highlight for location dropdowns in POS and Order Board.
* Feature: POS blocks product area when no location is selected.
* Feature: Seats per table — configurable seat count per table.
* Feature: Bulk table creation — create multiple tables at once with prefix and numbering.
* Feature: Location filter in table list.

= 1.1.2 =
* Improvement: Consolidated settings tabs – Checkout and Checkout Fields merged, Dashboard renamed to Order Board, Features tab shown first.
* Improvement: Simplified user roles to two-tier system (administrator + staff).
* Improvement: Rewrote help documentation to be feature-focused for new users.
* Fix: Optimized checkout CSS layout overrides for theme compatibility (Astra and others).
* Fix: Outdated legacy roles removed from Roles & Menus screen.

= 1.1.1 =
* Improvement: Prefix all variables in template files with lbite_ for WordPress.org compliance.

= 1.1.0 =
* Feature: Table Management module – create tables, assign to locations, generate QR codes for ordering.
* Feature: Order at Table – QR code URL stores table + location in session, checkout adapts automatically.
* Feature: Table filter in Kanban board and table name display in order cards.
* Feature: Clean uninstall – new uninstall.php removes all plugin data when enabled in settings.
* Security: XSS hardening in dashboard.js and pos.js (template strings replaced with jQuery DOM APIs).
* Security: wp_unslash() added to all superglobal access in tables module and admin AJAX.
* Security: current_user_can() check added to table meta save callback.
* Improvement: Performance limits added to all unlimited post queries.
* Improvement: readme.txt fully translated to English, external services disclosed.

= 1.0.9 =
* Feature: Onboarding page after initial installation.
* Feature: POS Payment Confirmation – overlay with order summary and payment method before order creation.
* Fix: HPOS incompatibility resolved – order meta now uses WooCommerce HPOS API.
* Fix: XSS in support settings and dashboard loading overlay resolved.

= 1.0.8 =
* Security: POS order now uses server-side product price instead of client price (prevents manipulation).
* Performance: Replaced unlimited wc_get_orders() calls with sensible caps (Dashboard 50, Kanban 200, Cron 100).
* Performance: Pagination in ajax_load_more_completed() switched to true DB pagination.

= 1.0.7 =
* Security: Added XSS escaping in dashboard.js and pos.js.
* Fix: Corrected wrong capability name in class-product-options.php.
* Fix: Fixed typo in feature key in class-checkout.php (enable_tip → enable_tips).
* Fix: Status labels in class-order-dashboard.php made translatable via WordPress i18n.

= 1.0.6 =
* Fix: Premium override only available in Pro version (WordPress.org compliance).
* Fix: Nutritional info, allergens, and sound notifications correctly marked as Pro features.
* Fix: Plugin description translated to English (WordPress.org guideline).
* Fix: Output escaping added to admin notices.

= 1.0.5 =
* Fix: Replaced Heredoc/Nowdoc syntax with external JS files (WPCS compliance).

= 1.0.4 =
* Fix: Changed function prefix from lb_ to lbite_ (WordPress.org naming convention).
* Fix: Moved inline CSS/JS from templates to separate enqueue files.
* Fix: Added nonce checks in checkout and product options.
* Fix: Updated SortableJS to version 1.15.7.

= 1.0.3 =
* Fix: Resolved all WordPress.org Plugin Check errors and warnings.
* Fix: Corrected direct file access protection, output escaping, and strip_tags() usage.

= 1.0.2 =
* Fix: Resolved WordPress.org Plugin Check errors (Tested up to tag, text domain loading).

= 1.0.1 =
* Improved: Freemius integration for better WordPress.org compliance.
* Security: Improved security checks and escaping.

= 1.0.0-beta =
* First beta version with Location Management, POS, Kanban order board, tipping, time slots, and Freemius integration.

== Upgrade Notice ==
