Use hotel_booking_has_feature() or hotel_booking_features() for boolean presentation capability. The result exposes only stable capability names, surface associations and core/optional type; it never exposes a license key, expiry, entitlement provider or failure reason. Render an optional section only when both capability and content are available.
For languages, call hotel_booking()->languages() and consume LanguageNavigationInterface. Use current(), available(), url(), state(), provider() and snapshot(). Each item provides code, locale, label, native_label, direction, url, current and switchable.
Safety rules
- Core owns provider detection, normalization, switch URLs, route locks and cache-safe state; the theme owns markup, placement, accessibility and display.
- Do not call WPML or Polylang directly, set a vendor global language or add a cookie.
- Respect
single_language,unavailable,lockedandprovider_errorstates. Sensitive confirmation and payment routes stay locked without switch URLs. - Keep
hb_languageand provider-localized actions on virtual booking routes.
These contracts let one theme support Free-only, Pro-enriched and multilingual sites with the same defensive rendering path and predictable fallback behavior.
Next: integrate payment gateways.