Developers
English
WordPress Plugin
Booking Cutoff for Listeo: Developer Guide
Technical guide for cutoff meta, CMB2 listing fields, Listeo availability interception, submission validation, and safe extension boundaries.
Developer scope. This guide covers safe customizations for Booking Cutoff for Listeo. Do not modify license checks, update checks, entitlement state, or ListingPilot Hub integration.
Architecture
The plugin adds listing meta fields through CMB2 and validates bookings through Listeo availability and submission flows. It is intentionally listing-level instead of global, so different listings can use different cutoff rules.
Listing meta
| Meta key | Purpose |
|---|---|
_cutoff_enabled | Checkbox flag. When enabled, the listing is subject to cutoff validation. |
_cutoff_unit | Cutoff mode. Supported values are hours and days. |
_cutoff_value | Positive integer value for the selected mode. |
Integration points
| Hook/action | Use |
|---|---|
cmb2_init | Registers the listing cutoff metabox. |
listeo_listing_type_fields | Adds cutoff fields into frontend listing forms where supported. |
wp_ajax_check_avaliabity | Intercepts Listeo availability checks for logged-in users. |
wp_ajax_nopriv_check_avaliabity | Intercepts availability checks for guests. |
template_redirect | Validates booking submissions before the booking flow continues. |
Safe customization patterns
- Add child-theme CSS around cutoff field presentation.
- Add admin helper text explaining cutoff policy.
- Build reporting for listings missing cutoff settings.
- Add business-specific validation before booking, without bypassing plugin validation.
- Keep license and updater code untouched.
Testing
- Availability AJAX blocks dates inside the cutoff window.
- Direct booking submission is also blocked.
- Hours and days modes both work.
- Disabled listings do not apply cutoff logic.
- Timezone-sensitive same-day and next-day bookings are tested.