Developers
English
WordPress Plugin
Working Hours Sync for Listeo: Developer Guide
Technical guide for sync sources, Listeo opening-hours meta, listing place IDs, AJAX jobs, cron batches, hooks, and safe extension boundaries.
Developer scope. This guide covers safe integrations for Working Hours Sync for Listeo: source configuration, listing meta, AJAX jobs, cron batches, and hooks. Do not modify license activation, deactivation, entitlement, or update logic.
Architecture overview
The plugin maps external business-hour data into Listeo opening-hour post meta. It includes admin settings, single-listing sync, bulk sync, cron scheduling, source API testing, and listing-level auto-sync controls.
Settings classRegisters API keys, source, interval, concurrency, per-page, format, and link type options.
Sync classReads Place ID/address and writes Listeo opening-hour meta.
Cron schedulerProcesses auto-sync listings in batches.
HooksCompletion actions and batch-size filter for integrations.
Settings options
| Option | Purpose |
|---|---|
listeo_outscraper_api_key | Outscraper credential. |
listeo_google_places_api_key | Google Places credential. |
listeo_hours_sync_source | Selected provider source. |
listeo_hours_sync_interval | Scheduled sync interval. |
listeo_hours_sync_concurrency | Bulk processing concurrency. |
listeo_hours_sync_per_page | Admin list pagination and batch sizing support. |
listeo_hours_sync_date_format | Display/format preference. |
listeo_hours_sync_link_type | Provider link behavior. |
Listing meta
| Meta key | Purpose |
|---|---|
_place_id | External place identity used for sync lookups. |
_address | Fallback address data for lookups. |
_hours_auto_sync | Listing-level scheduled sync flag. |
_hours_last_sync | Last successful sync timestamp. |
_opening_hours_status | Enables opening hours in Listeo after sync. |
_listing_timezone | Timezone saved when available from source data. |
_{day}_opening_hour, _{day}_closing_hour | Listeo opening and closing hour fields for each day. |
AJAX actions
| Action | Purpose |
|---|---|
listeo_sync_single_hours | Sync one listing. |
listeo_hours_sync_test_api | Test selected provider credentials. |
listeo_hours_sync_bulk | Run bulk sync from the admin screen. |
listeo_hours_sync_manual_cron | Trigger scheduled processing manually. |
listeo_hours_sync_toggle_auto | Enable or disable auto-sync for listings. |
lhs_activate_license, lhs_deactivate_license | Reserved licensing actions. Do not override. |
Hooks
| Hook | Use |
|---|---|
listeo_hours_sync_completed | Runs after a listing sync completes. Useful for logs, notifications, or cache clearing. |
listeo_hours_sync_batch_completed | Runs after a cron/bulk batch completes. |
listeo_hours_sync_batch_size | Filter the cron batch size. Keep conservative values on shared hosting. |
Safe customization patterns
- Add logging after
listeo_hours_sync_completed. - Clear listing caches after successful sync.
- Filter batch size for hosting constraints.
- Build an admin report of listings missing
_place_id. - Protect manual exception listings by disabling
_hours_auto_sync.
Do not do this
- Do not expose API keys in frontend JavaScript.
- Do not overwrite opening-hour fields from a custom importer while sync jobs are running.
- Do not bypass provider usage limits or retry failed API calls aggressively.
- Do not alter license or update handlers.
Regression test checklist
- Single sync writes correct day fields.
- Bulk sync respects concurrency and does not time out.
- Auto-sync only runs for enabled listings.
- Timezone and 24-hour/closed-day cases render correctly on public listings.
- Hooks fire once per completed listing or batch.