Live fleet and availability from a charter booking platform
The problem
Fleet, availability and pricing live in an industry reservation platform. The website has to reflect all of it exactly, without anyone retyping a boat specification twice.
Charter businesses keep their fleet in an industry reservation system. Your website is downstream of it, and the moment the two disagree you are selling a boat that is already booked.
What it syncs
- Boats with their specifications, equipment and services, plus images, with a forced re-sync when the upstream images change.
- Marinas, so filter labels come from real base data rather than a hand-maintained list.
- A fleet shortcode with pre-filtering, sorting, pagination, and a choice of carousel or grid, so the same data presents differently on different pages.
- A reviews tab on each boat, fed from the charter reviews collected after a booking.
A bug worth writing down
Boat pages were rendered by including a template and then calling exit. It works, in the sense that the right HTML appears. What it also does is skip everything WordPress runs after the template — so the theme’s own footer scripts never fired and the mega menu quietly stopped working, and the translation layer never got to rewrite the page.
The fix is to store the chosen template path during the redirect hook and hand it back through the template filter at a late priority, letting WordPress finish its own lifecycle. That one change removed several unrelated bugs that had been logged separately, which is usually the sign you have found the real cause rather than another symptom.
Upstream data is not your data
Equipment names arrive with invalid byte sequences that render as stray question marks. The tempting fix is a regular expression over the incoming feed; the safer one is to clean at the point of display, because the day the supplier fixes their encoding, a scrubber in the import path becomes a corruption of its own.
The outcome
A sync plugin that pulls boats, equipment, marinas and availability from the booking API and renders them as the company's own landing pages, with a configurable fleet shortcode.
