=== TEG-WINERY ===
Contributors: theeldestgeek
Tags: winery, business, invoicing, small business
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
Stable tag: 1.20.1
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Wine club, tasting room, events and cellar, for a winery that sells its own wine.

== Description ==

The winery back office. The cellar counted in bottles and cases with production lots and a stock ledger; a tasting-room till that knows who is in the club; the wine club from tiers and memberships through building a quarterly release to charging, packing and shipping it; events and tastings with capacity and bookings; specials stored as rules rather than typed-over prices; and the reports a winery is actually asked for.

* Wines, vintages and formats, with production lots and a movement ledger
* Stock per location, with bottles held for a club release so the counter cannot sell them twice
* Wine club: tiers, memberships, pauses, cancellations with a reason, and card expiry caught before a release fails
* Releases: build one member order per active member, charge, pack, ship, and a pick list for the floor
* Events and tastings: capacity, member pricing, bookings, attendance and a guest list to carry
* Specials as rules, with the discount and the reason recorded on the order
* Reports: depletion, sales by wine and channel, club growth and churn, event revenue, margin
* A visitor page with the wine list, the club join form and event booking
* Takes card payments online through your own Square, Stripe or PayPal account, and on a Square Terminal at the counter; everything else (cash, check, Zelle, Venmo, ACH, a bank transfer...) recorded by hand, with refunds never above what was paid and the payments CSV
* TEG Rover (the drivers' phone app) - switched OFF until the winery turns on "Rover (drivers / field staff)" under Setup > Device pairing; then TEG-WINERY > Shipping > TEG Rover. Deliveries by the winery's own drivers: a club delivery (one member's order of a club release) or an order delivery (a web or counter order). The office makes a call from the order (the customer, the delivery address and the bottles fill in) and puts it on the open board or gives it to a driver; the driver claims it (two can never take the same one), gets directions, ticks the checklist and completes it. Every completion needs an adult's signature AND the 'age verified' step - the driver records that the person at the door showed an ID proving they are old enough (the winery's minimum age, 21 unless Settings says otherwise) - and the shop refuses the completion without both, even if the office edited that call's requirements. The shop keeps only that the step was done, the ID type and the time: never an ID number, a birth date or a picture of the ID. A completed club delivery goes to Shipped (carrier: Own driver); what is taken at the door waits for the office, which confirms it before it is a payment on the order. A customer known to be under the minimum age cannot be sent a delivery. This records that a step was done; it is not a claim of legal compliance anywhere - the rules differ from state to state and meeting yours stays your responsibility. GPS check-ins ONLY while on shift; a delivery finished without signal is queued on the phone and sent when the signal returns; each phone pairs by scanning a QR code under Setup > Phones with its own revocable key, no passwords; the data stays on your own site, and there is no monthly fee per driver.

Data lives in your own database, in tables this plugin creates. Nothing is sent
anywhere: the only outbound request is the license check, and that carries the
code and nothing else.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/` and activate it.
2. Open TEG-WINERY in the admin menu and work through Settings.
3. A 30-day Pro trial starts on first run. There is nothing to enter.
4. The one-click setup makes the pages. To put a block on a page of your own, use a shortcode: [teg-winery-wines], [teg-winery-events], [teg-winery-club], [teg-winery-book], [teg-winery-order] or [teg-winery-account] (full list: Help Center > Shortcodes).

== Companion app ==

The TEG Companion phone app can run the tasting room from a phone: customers, a sale of a wine, payments (Take payment: a card by a Square link, the counter's Square Terminal or the Square app; Zelle, Venmo and PayPal wait for the office to confirm them; cash and checks recorded at once), voiding a sale, notes, photos, pickup signatures and the day's payments by method (closing the day stays on the website). Open TEG-WINERY, Setup, Phones (TEG Rover and TEG Companion share this list and one key store) to pair a phone with a QR or a 9-digit code. A sale, payment or status change for a customer with no date of birth, or under the legal drinking age, is refused with the shop's own age warning. Photos and signatures stay in a private folder, not the media library.

== Frequently Asked Questions ==

= What happens when the trial ends? =

The shop pauses rather than locking. Everything already recorded stays readable
and exportable; new entries wait until a license is active.

= Does my data leave the site? =

No. The only outbound request is the license check.

= Can I delete the plugin without losing everything? =

Yes. Uninstall keeps your tables unless you have explicitly turned that off in
Settings, Data and updates.

== Changelog ==

= 1.20.1 =
* Help: the Help Center now has one Shortcodes section listing every shortcode this plugin adds, with what each does and an example, and a question about it in the FAQ. No other change.

= 1.20.0 =
* Help: a new Help Center (TEG-WINERY > Tools > Help & Tutorials) - the whole manual with a search box and the common questions, brought up to date with every screen. The round "? Help" at the top right of every TEG-WINERY screen opens the part about that screen.
* New: "Get support" at the top of every TEG-WINERY screen - report a problem or ask for a feature, and it reaches The Eldest Geek with the details we need (TEG-WINERY > Tools > Support & feature requests lists what you sent). Nothing is sent until you press Send it.
* New: backups (Settings > Data & updates). "Back up now" writes everything the winery holds - every record and its settings, never a payment password or key - to a private folder on this server; download it, upload it back, or restore it (typed RESTORE, after an automatic safety backup). Scheduled backups can take one every night and copy it off the server (SFTP, FTP / FTPS, Amazon S3 / Wasabi, Dropbox). Nothing runs until you switch it on.
* New: a setup page for a new winery - your details, the visitor pages and their menu, the staff role, and a sample winery to try things with that Finish removes again. It opens once after you activate the plugin. On a winery that updates, administrators see a one-line notice with "Start the setup" and "No thanks" until they choose one; "Run setup again" is on Settings > Data & updates.
* What's new: when more than one release came out since the notes you last opened, the "What's new" button now lists every one of them, each under its version.

= 1.19.1 =
* "What's new" no longer opens by itself after an update. The dashboard has a button "What's new in 1.19.1"; press it to read the notes.

= 1.19.0 =
* The TEG Companion and TEG Rover phone apps can show their screens in another language when your shop has the Pro edition and a language pack. This needs the next update of the apps; until then nothing changes.
* An order or receipt opened on the phone always shows exactly what your customer gets, in the shop language.
* Help Center and menu refresh.

= 1.18.0 =
* New: a Language screen in Settings (TEG-WINERY > Settings > Language). Each staff member can choose their own language for the screens they use, on their profile.
* The winery has a language of its own for what customers receive - receipts, release notes, e-mails and texts - so what a customer gets no longer depends on who clicked the button.
* Language packs (Spanish first) will arrive later and need the Pro edition. With no pack installed, everything stays in English exactly as before.
* Fixed: the tax label and the wording of the customer e-mails you set in Settings could be saved in the language of whoever was signed in; they are now kept as you wrote them.
* Help: a Language section, with two common questions.
* Shared pieces brought up to date: payments core 1.5.0 and app payments core 1.3.0.

= 1.17.3 =
* New: Licenses & permits (TEG-WINERY > Setup > Licenses & permits) - keep your licenses, permits, bonds and label approvals in one place, with reminders before they expire and a printable binder for inspectors: the TTB basic permit, the wine bond, the ABC winery / farm winery license, label approvals (COLAs), the business license, or anything else, with the number, who issued it, the dates and the scanned certificate. Renewing keeps the old one as history; each shows Current, Expiring (60 days), Expired or Missing.
* Lab instruments (pH meters, hydrometers ...) and their calibrations can be kept too, if you switch Equipment on in its Settings (the menu item then reads Licenses & equipment).
* Reminder e-mails 60, 30 and 7 days before anything expires and when overdue; a dashboard box while anything required is missing or expired; a one-click inspection binder (print, PDF or a ZIP of the scans) and a 7-day view link.
* Scans are kept in a private folder (never the media library) with their hidden metadata removed, every view is logged, and the register is in every backup. Deleting the plugin keeps the register unless you choose otherwise. The presets are examples (Virginia first), not legal advice. Shipping compliance is unchanged and separate.
* Help: a Licenses & permits section, with two common questions.

= 1.17.2 =
* TEG Companion reports can show older months too (this month, last month and up to 10 more; set how many in Companion).
* Shared pieces brought up to date: TEG Companion core 2.16.0.

= 1.17.1 =
* Payments: the currency symbol always matches the currency (a US shop never shows £).
* The app payments list in TEG Companion shows the date your region's way.
* Shared pieces brought up to date: payments core 1.4.0 and app payments core 1.2.2.

= 1.17.0 =
* Dates now follow your region: a US winery shows 11/09/2026, a UK one 09/11/2026, an EU one its country's own way - on screens, receipts, shipment notes, e-mails and the visitor page. Leave Settings > Money & measures > Date format blank to use your region's, or type your own. WordPress's own date setting no longer leaks in.
* Receipts printed before keep the dates they were printed with (in the region they were printed in).
* TEG Companion is told your date format, so the phone shows dates the same way as the website.
* Shared pieces brought up to date: region core 1.2.0, TEG Companion core 2.15.0 and TEG Rover core 1.10.0.

= 1.16.4 =
* New sales channel "Trade (wholesale)" for case orders from restaurants and shops that buy on account: pick it on a new sale (or from the phone), and Reports > Sales by channel, the orders list and specials keep it apart from the tasting room.
* A customer's order list shows the channel by its name ("Tasting room", "Trade (wholesale)").
* Help: the Companion app shows the day's payments by method; closing the day stays on the website (the help said the phone closes the day).

= 1.16.3 =
* TEG Companion: an older order now shows its invoice (and Take payment) on its job screen.

= 1.16.2 =
* Square Terminal: a payment cancelled from TEG Companion is only shown as cancelled once Square confirms it; unconfirmed cancels are retried automatically and a forgotten checkout is cancelled after 15 minutes.
* Shared pieces brought up to date: TEG Companion core 2.14.0 and TEG Rover core 1.9.1 (work done on a phone while offline keeps the time it was really done; pairing a phone with Rover switched off just works).

= 1.16.1 =
* Wine club: "Charge saved cards automatically" (Settings > Club, off until you tick it). When it is on, each release charges its members' saved cards by itself, once, on the date you choose: the release's cut-off date, its ship / pick-up date, or a number of days before ship. It uses exactly what the "Charge saved cards" button uses, so a declined card is tried again on your usual schedule and the member gets the usual "update your card" e-mail.
* The release screen says "Cards will be charged automatically on <date>", and the button still charges early. Orders you mark charged, failed or skipped yourself, and orders whose charge you stopped, are never charged. Each automatic run is written to the activity (for example "Charged 12 of 14 saved cards automatically"). Only releases whose date comes after you switch it on are charged.
* Nothing changes until you tick it; every order, payment and setting stays as it was.

= 1.16.0 =
* Wine club releases can be charged to the member's saved card. Switch it on under Settings > Payments, "Saved cards and automatic charging" (off until you tick it; it needs your Stripe or Square account switched on there). The card is typed into Stripe's or Square's own form: the winery keeps only the processor's reference, the last four digits and the expiry, with the words the member agreed to and when.
* Members save, change or remove their card themselves from their page ("Update or remove your card"), and a new member who joins on the website is offered it straight away. Staff can e-mail a member the link, or remove a card, from the member's club record.
* On a release, "Charge saved cards" charges every pending or failed member order whose member saved a card - each order once, however often it is clicked. A declined card marks the order failed with the reason, is tried again on your schedule (by default three tries over seven days, then it stops) and the member is e-mailed "your card was declined - update it here" each time (you can switch that e-mail off; each one has a link for the member to stop them). Members without a saved card are charged the usual way, as before.
* Nothing changes until you switch it on; every order, payment and setting stays as it was.

= 1.15.1 =
* TEG Back Office: the staff list it reads from the winery now follows the one rule every TEG shop shares - Tasting Room Staff first, then the other managers, then the administrators, each person once. The same people as before; only the order changed (the event host picker and TEG Companion use the same list).
* Shared cores checked against the latest TEG release (TEG Companion 2.13.0, TEG Rover 1.8.0, payments 1.2.0): already current.

= 1.15.0 =
* Card payments come from the payments module every TEG shop now shares: card payments online through your own Square, Stripe or PayPal account, and a Square Terminal at the counter ("Send to Square Terminal" on the order, pairing under Settings > Payments).
* Nothing to set up again: the gateway settings and webhook addresses are the same, and every payment already recorded stays exactly as it was.
* Each payment on an order has its own refund box: a card or PayPal payment goes back through its gateway, never more than was paid. The Refund box for money handed back at the till (with the bottles that came back) stays.
* A payment is written once however often the gateway reports it; money that arrives for an order already paid another way is kept aside and shown in a notice to apply or refund.
* A payment can no longer be more than the order still owes; a refund can no longer be more than it was paid. A whole card number is never accepted as a reference.
* Settings > Payments never shows a saved secret again, and saving with a secret left blank keeps it. A key kept in wp-config.php is copied into Settings once (a notice says which); you may then remove it.
* TEG Companion: Take payment on an order - a Square link, the Square Terminal or the Square app on the phone; Zelle, Venmo and PayPal wait for the office to confirm them.
* Pay-by-QR codes (Zelle, Venmo, Cash App) under Ways to pay, card terminals (Clover, Elavon) recorded by hand, and a payments CSV.
* Licence check knows TEG-MARKETER and the Back Office bank feed.

= 1.14.9 =
* Licence check knows the new TEG Total Auction Management (TAM) product.

= 1.14.8 =
* Back Office shows as Back Office in Setup; the pairing page is called Device pairing everywhere.
* The Help page is called Help & Tutorials in the menu, and the help pages now point to Setup > Device pairing.

= 1.14.7 =
* The admin menu is kept in step with the other TEG shops (the shared menu code is updated); the menu looks and behaves exactly as before.

= 1.14.6 =
* The admin menu is grouped the same way as the other TEG shops: Help is now "Help & Tutorials" under Tools, the Phones page is now "Device pairing", and Settings is the last row of Setup.

= 1.14.5 =
* The licence check and the updater now share one tested core: a slow licence server can no longer slow the shop down.

= 1.14.4 =
* Money in another currency is always written with its own symbol.
* Product names in the licence screen use the new spelling (TEG-DELI, TEG-FOODTRUCK, TEG-BUTCHER, TEG-BAKERY).

= 1.14.3 =
* Money in another currency is written with its own symbol on the TEG Rover cards.

= 1.14.2 =
* Customer links (invoices, quotes, bookings and the like) only open with their exact key; a link with a blank or altered key opens nothing.

= 1.14.1 =
* TEG Rover collects on an invoice in the currency it was issued in, and its cards count one currency at a time.
* The "Not counted above, in another currency" line writes each currency its own way (for example 1.190,00 €).

= 1.14.0 =
* Region setting: one tick switches the shop between the United States, the United Kingdom and the European Union - currency, dates, tax, address wording, spelling and the ways customers can pay. Invoices already issued never change. The sample data now reads as a US business.
* Settings > Region: the region, the EU country, what the region sets (only the settings you have not changed yourself move), an "Apply the region's defaults" button, and what the region asks of a winery (TTB and state licenses in the US; HMRC alcohol duty, AWRS and a premises license in the UK; excise duty in the EU; the legal drinking age).
* Receipts and club orders keep the currency, tax rate and label, date format, letterhead and license number they were issued with, on screen, in print, on the order lists and on the member's page. Taking a payment never works an order's tax out again at today's rate.
* In the UK and the EU wine prices include VAT (Settings > Money & measures > Prices include tax); in the US sales tax is added on top, as before. New date and time format settings (blank follows WordPress, as before).
* Payment methods follow the region: the US adds ACH and Cash App / Apple Pay / Google Pay; the UK takes bank transfers and cheques; the EU SEPA transfers. Zelle and Venmo are US-only, PayPal is everywhere. A payment already recorded always shows as it was. An online payment is charged in the order's own currency.
* An existing winery becomes United States (or the United Kingdom / the European Union when it had typed £ / GBP or € / EUR); nothing you typed changes. Amounts typed with a decimal comma (12,50) are read correctly.
* Totals and reports now count one currency at a time: after a region switch, money in the old currency is listed apart instead of being added in. The TEG Companion app shows every invoice in the currency it was issued in.

= 1.13.0 =
* Every customer now has one Customer notes box, on the desktop and in the Companion app: the general notes first, then the notes from their orders, payments, club membership and event bookings, with who wrote each one and which came from a member of Staff.
* The general notes are the age check (in red when there is no date of birth on file or the customer is under age) and the customer's Notes. On the customer's screen the Notes are in the box now, not in Details.
* A note added on a customer from the Companion app is kept as its own note in the box, with who wrote it. It is no longer added to the end of the customer's Notes field (the notes already there stay).
* Notes on payments and refunds show in the box on the desktop only; they never go to the phone.
* Removing the plugin with its data now also removes the customer notes.
* No change to the winery's own tables.

= 1.12.2 =
* Report cards use winery words in the small print too: the seats booked ahead card now says "17 of 30 seats" and "Empty seats" instead of "slots".
* Report cards leave out rows that do not apply: the event no-shows card no longer shows "Money lost 0", because the winery charges nothing for a missed event.
* No database change.

= 1.12.1 =
* Report cards on the phone now open the matching report on the desktop: sales, average sale and tax open Reports > Sales by channel, today so far opens Sales by day, gross margin and the best times for your wines open Sales by wine, wines that have not sold and stock turn open Inventory, event no-shows and how full your events are open the Events report, seats booked ahead opens Events and regulars to call opens Customers.
* Card names fit a winery: "Best times by wine" instead of "by item", wines that have not sold instead of items, event bookings and event seats instead of appointments, rooms or halls, wine sales minus what the wine cost on the gross margin card, and new customers by where they first bought (there is no marketing spend to show).
* Clearer dates on the cards: "October 1" instead of "October 1-1", and "Jan 5-10, 2031" instead of "Jan 5, 2031 to Jan 10, 2031".
* No database change.

= 1.12.0 =
* New: report cards on the TEG Companion phone app. Each person picks the cards they want to see on their own phone, sorted into sections (everyday, money, customers, bookings, stock): today so far, sales this month against last month and last year, average sale, busiest hours, takings by payment method, discounts, refunds and voids, tax collected, gross margin, repeat customers, where new customers came from, regulars who have not been back, event no-shows, seats booked ahead and how full your events are, wines that have not sold, stock turn and the best days and hours for your top wines. Tap a card to see the orders behind the figure.
* New: two winery cards of their own - club members due to ship in the next 30 days (with what is ready, still to charge or failed), and declined club charges this month, with the money still to collect and who to call.
* New: a Reports cards page on the desktop (under Sales & money). See every card side by side and compare with the last period, the same time last year or dates you choose. Set a goal for a card to see how close you are, download the figures as a CSV file or print the page.
* New: "Lost customers after" setting (Settings > Tasting room). Choose after how many days without a sale a regular counts as lost on the "Regulars to call" card - from 30 to 730 days, 90 to start with. Club members and customers booked on an upcoming event are never on that list.
* New: an optional monthly summary e-mail. On the 1st of each month the cards you tick are e-mailed for the month that just ended. It stays off until you save it once on the Reports cards page, and E-mail test mode applies to it.
* Reports > Sales by channel now shows an "All channels" total row at the bottom.
* Turning the plugin off now also stops its scheduled e-mails, and removing the plugin with its data also removes your report goals and summary settings.

= 1.11.0 =
* New: TEG Rover, the phone app for your own drivers, now comes with TEG-WINERY. It stays switched off until you turn on "Rover (drivers / field staff)" under Setup > Phones. Once on, a club delivery or an order delivery can go to a driver's phone; the driver gets directions, ticks the checklist and finishes the delivery with an adult's signature and the age check at the door. The phone keeps only that the ID was seen, never the ID number.
* New: errands for your drivers - a supply run, a bank deposit, a trip to the post office. Pick a ready-made errand (bottles and closures, labels and boxes, cellar supplies, tasting room restock, bank deposit, post office) or write your own, with a shopping list the driver ticks off, an optional spending limit and a photo of the receipt for what was bought.
* TEG Companion and TEG Rover phones are paired on the same Setup > Phones page, with a QR or a 9-digit code. Phones you paired before keep working.
* New: Import from CSV (Setup > Import from CSV). Bring your existing customers and wines in from a spreadsheet: match your columns to the winery's fields, do a test run that changes nothing and shows what would happen, then import - and undo the whole import with one click if it was not right. Your column matches are remembered for next time. New wines arrive as drafts, not for sale, unless the file says otherwise. Import from CSV pauses with the licence, like every other change.
* One-click setup can now add a sample winery to try things out with - twelve wines with stock, forty customers (thirty of them club members), about three months of orders and five events with bookings - and remove exactly what it added again, without touching anything you entered yourself (Settings > Data). It will not load on a site that already has real wines, customers or orders.
* Database: new tables for driver deliveries, errands and imports, added automatically when you update.

= 1.10.0 =
* New: E-mail test mode (Settings > E-mail test mode). Turn it on before going live and every e-mail the site sends - invoices, receipts, reminders, status notes, staff alerts - goes to one address you choose and to nobody else. The subject starts with [TEST to ...] so you can see who it was meant for; the message is exactly what the customer would get. Administrators can switch it from the TEG Companion app too (Settings > E-mail test mode), and a red notice shows on every admin page while it is on. Text messages are not e-mail and still go out.
* TEG Companion: shared Companion core 2.4.0.

= 1.9.0 =
* Order wine on the website: each wine gets an "Add to order" button, and there is an Order wine section and a [teg-winery-order] page. The customer chooses shipping to an address or pickup at the tasting room. Under-age buyers and ship-to states the winery is not licensed for are turned away, and club members see their member prices. Orders arrive in Sales as Unpaid.
* Online orders are OFF on a winery that updates to 1.9.0. To turn them on, tick Settings > Visitor page > Take orders. A new install has them on.
* Saving always says so: the "saved" notice now shows reliably after every Save, even with another screen open or an auto-refreshing page.
* Database: new ship-to and pickup columns on orders, added automatically when you update.

= 1.8.1 =
* Demo sites never take a real payment: on a demo (Demo mode, or the TEG SHOPS demo) the pay area says This is a demo - no payment is taken, every pay link and webhook is refused and nothing is recorded as paid.

= 1.8.0 =
* A website club join that matches a customer on file waits for staff to Confirm membership.
* Members-only events and the member seat price need the member's portal key on the public booking form.
* The refund form lists each wine line with bottles back in stock; only those bottles go back.
* Gateway refunds (PayPal, Stripe, Square) reach the order through the payment they came from.
* Updates: an update whose manifest publishes no SHA-256 checksum is never offered or installed.

= 1.7.0 =
* TEG Companion: the store chooses what the phone's home screen shows (owner 2026-10-28: too cluttered). Phones (TEG Companion) has a new section, **Companion home screen defaults**: one checkbox per button, card, list and bottom-bar tab the app's home has at this shop (Buttons / Cards / Lists / Bottom bar) and "Reset to starter set". Ticked = shown by default; each person can still change it on their own phone. app/hello's module rows carry `home` {v: 1, items: [{id, label, group, on}]} - only what that person can see. Never saved = the starter set: every button the app has here on (four or fewer: New <job>, New <customer> and the shop's own extras), every list and tab on. Shared Companion core 2.1.0 (generated; tools/test-companion-home.php).

= 1.6.4 =
* Load the sample winery now clears out what the very first sample (before 1.5.1) left behind: its six wines (SKUs starting PC-), its one club tier, its single member and its release REL-SAMPLE-1. Loading the sample only ever added and updated, so a site that had loaded that first sample kept those rows through every later load, demo resets included. Only rows that sample made are removed; a wine of it that was sold is retired instead of deleted, so the sale still points at it, and nothing the winery entered itself is touched.

= 1.6.3 =
* Licences for the new shops: TEG-EVENTCENTER, TEG-LASTDJ and TEG-FARM are known to the licence code, in lockstep with the rest of the family. A bundle licence that includes them is read correctly and names them on the License screen; nothing else changes.

= 1.6.2 =
* Get my license: Settings > License - enter the order number and e-mail to install your license; Check license; Release this website.

= 1.6.1 =
* The sample winery is now Larkspur Ridge Cellars, an invented winery that looks like it has been trading for years: twelve wines across several vintages, a three-tier club with thirty members, three releases (one shipped, one being collected now, one planned), two months of tasting-room, online and event orders, and tastings coming up. All dated relative to today. The sample no longer uses any real winery's wine names, and every phone number, address and e-mail in it is invented. Loading it twice changes nothing.

= 1.6.0 =
* Companion phone app: pair TEG Companion from Setup > Phones (QR or code) to work the tasting room from your phone - customers, sales, payments (records only, nothing is charged), notes, photos, pickup signatures and day close, with the winery's own age check.

= 1.5.0 =
* Shipping compliance (groundwork): a new Settings > Shipping compliance tab to connect the compliance service you already use - Sovos ShipCompliant or Avalara - so a direct shipment is checked before it goes out instead of after. The service decides whether wine may be shipped to an address; your winery remains responsible for its own compliance, and TEG-WINERY never files a state report for you.
* Not yet available: the Sovos and Avalara connectors need sandbox access from each vendor to be finished. Until then, choosing either one holds every direct shipment rather than guessing. The default, None, changes nothing - the direct-shipment file under Reports works exactly as before.
* With a provider selected: club orders that ship are checked when a release is built (Block marks a refused order failed; Warn and hold keeps it but it cannot be packed or shipped), the shipment is committed to the provider at label time or when shipped (your choice), and a committed order that is skipped or failed is voided with the provider. A provider that cannot be reached always holds the shipment and is retried hourly, or at once with "Retry held now". Held parcels are kept out of the Pirate Ship file and a Pirate Ship import will not mark them shipped.
* Settings for the environment (sandbox or production), credentials (stored apart from the other settings, never shown again after saving, never logged, or set in wp-config.php), your ship-from address, federal basic permit, bonded premises and state license numbers, and the states you are licensed to ship to.
* Each wine now has a Brand and a Provider product key alongside its varietal, vintage, size, ABV and bottles per case, and a new "Match wines to provider product keys" screen sets them all at once. Updating keeps every existing record as it was.
* The admin menu is grouped: Dashboard first, then TASTING ROOM (customers, events, sales, specials), WINE & CLUB (club releases, wine club, wines & cellar), SHIPPING (shipping, shipping compliance), SALES & MONEY (reports), TOOLS (help) and SETUP (settings, two-factor sign-in), alphabetical within each group. The group headings are bold capitals in the open menu, the hover fly-out, the collapsed menu and on a phone; a heading only shows when you can open something under it. Every page keeps its address.
* The Mock test provider is never offered by WP_DEBUG alone anymore - a real winery that left debug logging on could otherwise select it and ship on a fake "ok". It now needs a site to explicitly opt in (a filter), and even then it can never be chosen together with the Production environment (that combination always holds shipments instead). The public club join form's early compliance check is now also rate-limited per visitor, on top of the existing join throttle.

= 1.4.1 =
* The license server moved to wildwebwizards.com (licenses, trials and site checks now go to https://wildwebwizards.com/cgi-bin/postlicense.py). Nothing changes for your license.

= 1.4.0 =
* "What's new": the winery screens show what changed once per staff member per version, then a small "What's new" button on the Dashboard reopens the same notes in a dialog. In Demo mode, where every visitor shares one login, the "seen" state is remembered per browser instead, so one visitor dismissing it never hides it from the next.

= 1.3.2 =
* License check-in is more patient with a slow or blocked connection: a failed check is remembered for a few minutes instead of trying again on every page, and the License panel now shows the actual connection error instead of guessing it is your internet. A license still awaiting its first check-in is now labeled AWAITING VALIDATION rather than a plain revoked-looking state. Entering a license code checks in right away and says how it went.

= 1.3.1 =
* American English throughout: every screen, e-mail, printout and help text now uses American spelling (labor, color, license, canceled, catalog, authorize and the rest). Nothing you have saved changes - settings, records and translations carry over as they are.

= 1.3.0 =
* Licenses are now tied to your site. When you enter a paid code it checks in with the license server once and binds to this site's address; after that it keeps working normally even if the server is unreachable. Your data is never locked away - everything stays readable at all times.
* A brand-new install (or a copy placed on a different web address) that has a paid code but has never checked in stays in read-only mode for the paid features until it can reach the license server once. The License panel says so and "Re-check now" completes it. Wineries that were already licensed and running are carried over automatically on update - nothing to do.
* The trial is unchanged: it still works fully offline for 30 days from the first run.
* The value features now pause together when a license is not active: online club sign-ups and event bookings, card payments (Square/PayPal/Stripe), and business/CSV exports. Reading, viewing and exporting your own data for portability are always allowed; a payment already in flight is never interrupted.
* The License panel shows when a license is in use on more sites than it was sold for.

= 1.2.0 =
* Settings > Payments has a new "Payment methods you accept" list: Zelle, PayPal, Venmo, Credit card, Check and Cash, each with a tick box and one line of details (your Zelle e-mail or phone, PayPal.me link, Venmo @handle, "Checks payable to ..."). Card, check and cash start ticked, so nothing your customers see changes until you tick more. At least one method always stays ticked.
* Every order has a "Ways to pay" tick list, all accepted methods ticked on a new sale; untick any this customer should not use, on the new sale screen or later on the order. The order the customer opens from their link shows each offered method with its details while something is still owed.
* Stop accepting a method and it leaves new orders, while orders already issued keep showing what they offered.
* The online card button (Square or Stripe) now shows only when Credit card is accepted, and the PayPal button only when PayPal is, as well as the gateway being switched on.
* Taking a payment lists your accepted methods first and the winery's own ones (transfer, on account, other) under "Other".
* Every payment now records who took it, when, and a staff note. The order screen shows all three; the customer's copy lists "Payments received" by date, method and amount, and never the note.
* A new "E-mail the customer a receipt" box when taking a payment at the till, unticked until you tick it.
* Online PayPal payments are now recorded as PayPal rather than as a card payment. Old payments recorded as "cheque" show as Check.
* Fixed: an online payment arriving while "E-mail a receipt" was switched on under Settings > Payments stopped with an error after the payment was recorded, and the receipt was never sent. It is now sent.

= 1.1.2 =
* A license that has been revoked (after a refund, for example) no longer receives updates, lifetime licenses included. If the license server cannot be reached, updates carry on as before.
* CSV imports and exports no longer write a deprecation warning to the debug log on PHP 8.4.

= 1.1.1 =
* Updates are checked against your license: a lifetime or current license installs any update, and an expired license can still install anything released on or before its expiry date
* The update panel now shows on the Data and updates tab: whether the check works, which version is offered, and why one is held back
* Bottle swap: the dropdown no longer quietly picks the first wine; the member has to choose, and the confirmation names both wines
* Members can still swap a bottle while their order is packed for pickup
* The setting that decides whether a swapped bottle keeps the club price or carries the difference is now on the settings screen, where it had been missing
* Ready for PHP 8.4 (the version in Debian 13): no more deprecation notices in debug.log from the card payment code
* Translations now load at the point WordPress 6.7 expects, so a site with debugging on no longer logs a 'translation loaded too early' notice on every page
* The license screen now recognizes every product in the family, so a bundle license names the right shops

= 1.1.0 =
* Card payments on an order, club releases included, through Square, PayPal or Stripe
* The TTB 5120.17 report as a worksheet built from the cellar ledger (it files nothing; a winemaker still completes and signs the return)
* Direct shipments exported as the file ShipCompliant and Avalara import, so nothing is retyped
* Pirate Ship labels for club shipments, with the weight worked out from the bottle count and the shipper
* Club members can swap a bottle at pickup, with the cellar reservation moved and the price handled by a house-policy setting
* Members can swap their own bottles from their account page while a release is pending, if the winery turns it on (off by default)
* Two-factor sign-in with a QR code for the usual authenticator apps, backup codes, a lockout and an admin reset for a lost phone
* A sample winery to load from Settings > Data, with a club release waiting to be collected

= 1.0.0 =
* First release.
* Wines, vintages and formats, with production lots and a movement ledger
* Stock per location, with bottles held for a club release so the counter cannot sell them twice
* Wine club: tiers, memberships, pauses, cancellations with a reason, and card expiry caught before a release fails
* Releases: build one member order per active member, charge, pack, ship, and a pick list for the floor
* Events and tastings: capacity, member pricing, bookings, attendance and a guest list to carry
* Specials as rules, with the discount and the reason recorded on the order
