=== Godwit – Tour Booking for WooCommerce ===
Contributors: nitidadigital
Tags: travel, tours, trips, booking, woocommerce
Requires at least: 6.9
Tested up to: 7.1
Requires PHP: 8.2
Stable tag: 1.2.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Publish and sell trips on WooCommerce: trip pages with itineraries, search, a calendar, and a departure with its own date, price and seats.

== Description ==

Godwit is a WordPress plugin for tour operators and travel agencies. Every trip gets a full trip page and sells through your own WooCommerce store, with no booking platform taking a cut.

= Trip pages =
* Day-by-day itinerary
* Highlights, what's included, gallery, map and FAQs
* Destinations, types, difficulty and collections
* Related and featured trips; clone a trip in one click

= Finding a trip =
* Trip search with filters
* A calendar and an upcoming-trips list
* A favourites list visitors build as they browse
* Blocks, shortcodes and widgets to place it all on any page

= Selling =
* A departure for each trip, with its date, price and seats, added to the WooCommerce cart
* Sales stop a set number of days before departure
* Extras (single rooms, gear hire, transport) from one shared library, mandatory or optional per trip
* Fully translatable

= Godwit Pro =
For operators who run many departures and take money over time, [Godwit Pro](https://godwitbooking.com/) adds multiple departures per trip, early-bird, sale and group-size prices, per-departure stock caps for extras, a Departure Picker block, deposits and scheduled installments, passenger lists, occupancy and revenue reports, interest lists and a daily payments digest.

== Installation ==

1. Install and activate WooCommerce.
2. Install Godwit from Plugins → Add New, or upload the `godwit` folder to `/wp-content/plugins/`, and activate it.
3. Add your first trip under the new **Godwit** menu.

== Frequently Asked Questions ==

= Does it need WooCommerce? =
Yes. Trips sell through your WooCommerce store, so WooCommerce must be installed and active.

= Which database does it need? =
MySQL 8.0 or later, or MariaDB 10.5 or later (the versions WordPress recommends). The trip lists use common table expressions, window functions and JSON functions that older versions don't have.

= What does Pro add? =
Any number of departures per trip, early-bird, sale and group-size prices, stock caps for extras on each departure, a Departure Picker block, per-traveller deposits and scheduled installments with reminder emails, passenger lists, occupancy and revenue per departure, interest lists and a daily payments digest. See [godwitbooking.com](https://godwitbooking.com/#pricing).

= What is the difference between a trip and a product? =
A trip is a custom post type where you can manage trip details, while a product represents a package associated with a trip, which can be purchased through WooCommerce.

= Can I translate trips? =
Yes, the plugin is compatible with TranslatePress and other translation plugins for translating trip details.

= How do I turn on verbose debug logging? =
Godwit's verbose diagnostic logging (cart, checkout, payment and admin-sync
tracing) is off by default and is intentionally *not* controlled by `WP_DEBUG` — logging order
totals, payment modes and schedules by default on every request is not something
a commercial plugin should do, and `WP_DEBUG` is routinely left on in staging and even on some
production sites. To enable it while diagnosing an issue, add to `wp-config.php`:

`define( 'GODWIT_DEBUG_LOG', true );`

Diagnostic lines are then written to the WooCommerce log (WooCommerce → Status → Logs, source `godwit`).
Remove the constant (or set it to `false`) when you're done — a handful of genuine errors
(failed table writes, a broken payment path) are always logged there regardless of this setting.

= Hero images look soft or oversized on an existing site =
Godwit registers its own `godwit_hero` and `godwit_hero_mobile` image sizes. These crops are
only generated for images uploaded *after* the plugin is active — WordPress does not generate
new sizes retroactively for images already in your library. If you're activating Godwit on a
site with existing trip photos, run the [Regenerate Thumbnails](https://wordpress.org/plugins/regenerate-thumbnails/)
plugin (or `wp media regenerate`) once to produce the crops. Until then, Godwit falls back to
the original full-size image, so nothing breaks — it just isn't optimised.

== Screenshots ==

1. A trip page with its hero gallery, duration and highlights.
2. The day-by-day itinerary, with meals included each day.
3. What's included, what's not, and FAQs on the trip page.
4. The trip photo gallery in a lightbox.
5. Trip search with filters for destination, collection, type and difficulty.
6. The calendar lists upcoming trips by month.
7. Booking a departure: choose travellers and add extras such as a picnic lunch.
8. The trip and its extras in the WooCommerce cart.

== Privacy ==

Godwit makes no external requests and sends no data anywhere. It does not track visitors.

= Map embeds =

A trip's Map tab shows whatever map embed the site owner pastes there (for example from Google Maps, OpenStreetMap, Komoot or Wikiloc). That embed loads from the chosen provider, so a visitor who opens a trip page with a map connects to that provider under its own terms and privacy policy, for example [Google's](https://policies.google.com/privacy) or [OpenStreetMap's](https://osmfoundation.org/wiki/Privacy_Policy). Godwit itself sends the provider nothing; leave the field empty to use no map.

= Cookies =

The favourites list visitors build as they browse is remembered in a first-party functional cookie, `godwit_favs`, set by the visitor's own browser (not by the server) and kept for one year. It holds only the IDs of the trips they hearted (at most 50), contains no personal data, and is sent to no one: Godwit makes no external requests. Godwit starts no PHP session and sets no other cookie of its own.

= Customer data =

Bookings are WooCommerce orders. Customer details, and the traveller names entered at checkout (saved on the order's line items), are stored in your own database as part of those orders, and nowhere else. They belong to WooCommerce's order records, so Godwit never deletes them: uninstalling Godwit leaves every order intact, even with "Delete all data on uninstall" ticked. That option removes only Godwit's own data (trips, departures, itineraries, FAQs, its database tables and settings).

== Third-party libraries ==

Bundled unmodified in the plugin, each under a GPL-compatible licence:

* [Swiper](https://swiperjs.com) 14.4.0, MIT licence. Trip photo sliders. Source: https://github.com/nolimits4web/swiper/releases/tag/v14.4.0
* [Choices.js](https://choices-js.github.io/Choices/) 11.2.4, MIT licence. The trip search dropdowns. Source: https://github.com/Choices-js/Choices/releases/tag/v11.2.4
* [Lucide](https://lucide.dev) icons 1.68.0, ISC licence (`assets/icons/LICENSE-lucide.txt`). Source: https://github.com/lucide-icons/lucide/releases/tag/1.68.0. The interface icons inlined in `includes/helpers/svgs.php` and `assets/icons/trash.svg`, and the six rich-text editor toolbar icons (bold, italic, underline, lists, link), path data copied (each icon's shapes joined into one path) into `assets/js/godwit-editor.js`.
* [CMB2](https://cmb2.io) 2.13.5, GPL-2.0-or-later. Source: https://github.com/CMB2/CMB2/releases/tag/v2.13.5. Trip and settings fields in the admin (installed with Composer into `vendor/`).
* [Bricolage Grotesque](https://fonts.google.com/specimen/Bricolage+Grotesque) and [Hanken Grotesk](https://fonts.google.com/specimen/Hanken+Grotesk) fonts, SIL Open Font License 1.1 (`assets/fonts/LICENSE-OFL.txt`). Headings and body text of the optional Godwit look, served from the plugin.

The photo lightbox on trip pages (`assets/js/godwit-lightbox.js`) and the rich-text editor in the admin (`assets/js/godwit-editor.js`) are Godwit's own code. Nothing is loaded from a CDN.

== Changelog ==

= 1.2.0 =
* First release on WordPress.org.
* Trip pages, trip search, calendar, favourites, and blocks, shortcodes and widgets to place them.
* One departure per trip, with its date, price and seats, sold through the WooCommerce cart.
* Extras from one shared library, mandatory or optional per trip.
* A booking window in steps: travellers, then extras.
* Front-end styles in a layout layer and a look layer, both easy for any theme to override. Themes can opt out of the look with `add_theme_support( 'godwit' )`.
* Appearance settings: Godwit look or layout only, plus an accent colour.
* The WooCommerce products behind departures and extras are hidden from the shop, search and sitemap, and their product pages redirect to the trip.
* Plugin pages use the block theme's own header and footer on block themes, and are full width on classic themes.
