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.

Working Hours Sync for Listeo Version 1.0 15 min read Updated Jun 30, 2026
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

OptionPurpose
listeo_outscraper_api_keyOutscraper credential.
listeo_google_places_api_keyGoogle Places credential.
listeo_hours_sync_sourceSelected provider source.
listeo_hours_sync_intervalScheduled sync interval.
listeo_hours_sync_concurrencyBulk processing concurrency.
listeo_hours_sync_per_pageAdmin list pagination and batch sizing support.
listeo_hours_sync_date_formatDisplay/format preference.
listeo_hours_sync_link_typeProvider link behavior.

Listing meta

Meta keyPurpose
_place_idExternal place identity used for sync lookups.
_addressFallback address data for lookups.
_hours_auto_syncListing-level scheduled sync flag.
_hours_last_syncLast successful sync timestamp.
_opening_hours_statusEnables opening hours in Listeo after sync.
_listing_timezoneTimezone saved when available from source data.
_{day}_opening_hour, _{day}_closing_hourListeo opening and closing hour fields for each day.

AJAX actions

ActionPurpose
listeo_sync_single_hoursSync one listing.
listeo_hours_sync_test_apiTest selected provider credentials.
listeo_hours_sync_bulkRun bulk sync from the admin screen.
listeo_hours_sync_manual_cronTrigger scheduled processing manually.
listeo_hours_sync_toggle_autoEnable or disable auto-sync for listings.
lhs_activate_license, lhs_deactivate_licenseReserved licensing actions. Do not override.

Hooks

HookUse
listeo_hours_sync_completedRuns after a listing sync completes. Useful for logs, notifications, or cache clearing.
listeo_hours_sync_batch_completedRuns after a cron/bulk batch completes.
listeo_hours_sync_batch_sizeFilter 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.