WP Immo Sync

Theme settings file (wpis-settings.json)

Place an optional JSON file in the active theme (child theme when one is used) to override plugin options without using the admin Configuration tab.

{active-theme}/wpis-settings.json

The plugin reads it with get_stylesheet_directory(), so a parent theme file is not used when a child theme is active.

Only keys you set are applied. Omit everything else to keep database values or code defaults.

Precedence

  1. Key present in wpis-settings.json → that value (including false, 0, or "")
  2. Else the value stored in the wpis_settings table (admin Configuration tab)
  3. Else the code default listed below

The Configuration tab loads stored values from the wpis_settings table, then overlays keys present in wpis-settings.json. Runtime uses SettingsManager::get(), which prefers the JSON file.

Form-security keys can be set from the admin Formulaires tab. If the same key is present in wpis-settings.json, the admin field shows that value, is disabled, and displays a note that it is read from the file. Saving does not overwrite a JSON-locked key.

Types

Use native JSON types:

  • Booleans: true / false (the strings "0" / "1" also work)
  • Integers: 900, 60, 2
  • Strings: "wpis_estates", "agency@example.com"

An empty string "" still overrides the default. That matters for rewrite slugs: "" is applied as-is.

After changing a rewrite slug, flush permalinks (Settings → Permalinks → Save).

Disable one security check

{
  "formSecurityFastSubmission": false
}

Full example

{
  "debug": false,

  "formSecurityEnabled": true,
  "formSecurityCsrf": true,
  "formSecurityHoneypot": true,
  "formSecurityFastSubmission": true,
  "formSecurityRateIp": true,
  "formSecuritySimilarFields": true,
  "formSecurityCsrfTtl": 900,
  "formSecurityFastSubmissionSeconds": 2,
  "formSecurityRateTtl": 60,
  "formSecurityWeeklyReport": true,
  "formSecurityWeeklyReportEmail": "agency@example.com",

  "formEnableContactSaving": true,
  "formEnableRecipientEmail": true,
  "formEnableClientEmail": true,
  "formEmailDefaultReceiver": "agency@example.com",
  "formEmailDefaultSender": "noreply@example.com",
  "formEmailDefaultSenderName": "Agency name",

  "enableImportSystem": true,
  "enableImportCustomPostType": false,
  "customPostType": "",
  "enableProjectManagement": false,
  "enableProjectManagementCustomPostType": false,
  "projectCustomPostType": "",
  "enableAgentManagement": false,
  "enableAgentManagementCustomPostType": false,
  "agentCustomPostType": "",
  "enableTaxonomies": false,

  "postTypeEstateSlug": "wpis_estates",
  "postTypeProjectSlug": "wpis_projects",
  "postTypeAgentSlug": "wpis_agents",
  "taxonomyEstateCitySlug": "city",
  "taxonomyEstateCategorySlug": "category",
  "taxonomyEstatePurposeSlug": "type",
  "taxonomyEstateAmenetySlug": "amenities",

  "enableSyncAutomation": false,
  "enableCronImport": false,
  "enableCronUpdate": false,
  "enableCronRemove": false,
  "autoRemoveUpdatedEstates": false,
  "enablePartialRemove": false,

  "enableVueShortcodes": false
}

Debug

Key Type Default Description
debug bool false Extra sync logging and debug flags returned by admin API responses.

Form security

Public forms ([wpis-form-contact], [wpis-form-estate], [wpis-form-evaluation]) run these checks before a contact is saved or emails are sent. All checks are on by default. They can also be changed from the admin Formulaires tab; keys present in wpis-settings.json stay locked there.

Check order: CSRF → honeypot → fast submission → rate / IP → similar fields.

Fast submission uses the CSRF token timestamp. Disabling formSecurityCsrf also skips fast submission.

Key Type Default Description
formSecurityEnabled bool true Master switch. false skips every check and does not inject the token or honeypot.
formSecurityCsrf bool true Require a valid _wpis_token. Invalid or expired tokens return an error.
formSecurityHoneypot bool true Hidden website field. If filled, the plugin returns a fake success and does not save the contact.
formSecurityFastSubmission bool true Reject posts sent less than N seconds after the token was issued. Requires CSRF.
formSecurityRateIp bool true One consuming submit per client IP per window.
formSecuritySimilarFields bool true Reject when first name and last name are the same (after trim and case-fold).
formSecurityCsrfTtl int (seconds) 900 CSRF token lifetime. Non-positive values fall back to 900.
formSecurityFastSubmissionSeconds int (seconds) 2 Fast-submit threshold. Non-positive values fall back to 2.
formSecurityRateTtl int (seconds) 60 IP rate-limit window. Non-positive values fall back to 60.
formSecurityWeeklyReport bool true Send a weekly email every Monday at 08:00 (WordPress timezone) with blocked submissions from the last 7 days. No email is sent when there are no rows.
formSecurityWeeklyReportEmail string Site admin email Inbox for the weekly blocked-submissions report.

Boolean false, 0, and "0" disable a check. Missing keys keep the default (enabled).


Forms

Key Type Default Description
formEnableContactSaving bool true Save submissions in the WordPress contacts table.
formEnableClientEmail bool true Send a notification email to the agency when a form is submitted.
formEnableRecipientEmail bool true Send a confirmation email to the visitor.
formEmailDefaultReceiver string Site admin email Inbox for agency notifications.
formEmailDefaultSender string Site admin email From address on the visitor confirmation.
formEmailDefaultSenderName string Site name From name on the visitor confirmation.

Import / post types

Key Type Default Description
enableImportSystem bool false Create WordPress posts from ImmoSync estates.
enableImportCustomPostType bool false Import estates into an existing post type instead of wpis_estates.
customPostType string Target post type when enableImportCustomPostType is on.
enableProjectManagement bool false Import and manage projects.
enableProjectManagementCustomPostType bool false Import projects into an existing post type instead of wpis_projects.
projectCustomPostType string Target post type when enableProjectManagementCustomPostType is on.
enableAgentManagement bool false Import and manage agents.
enableAgentManagementCustomPostType bool false Import agents into an existing post type instead of wpis_agents.
agentCustomPostType string Target post type when enableAgentManagementCustomPostType is on.
enableTaxonomies bool Register city, category, purpose, and amenities taxonomies on estates.

Rewrite slugs

Used as the rewrite.slug of the matching post type or taxonomy. Flush permalinks after a change.

Key Type Default Description
postTypeEstateSlug string wpis_estates Estate post type permalink slug.
postTypeProjectSlug string wpis_projects Project post type permalink slug.
postTypeAgentSlug string wpis_agents Agent post type permalink slug.
taxonomyEstateCitySlug string city City taxonomy slug.
taxonomyEstateCategorySlug string category Category taxonomy slug.
taxonomyEstatePurposeSlug string type Transaction type taxonomy slug.
taxonomyEstateAmenetySlug string amenities Amenities taxonomy slug. The key spelling Amenety is required.

Sync automation

Key Type Default Description
enableSyncAutomation bool Allow cron-driven sync. Enabling it from admin also generates cronKey if missing.
enableCronImport bool Cron phase: create new estates.
enableCronUpdate bool Cron phase: update existing estates.
enableCronRemove bool Cron phase: remove estates that left the remote feed.
autoRemoveUpdatedEstates bool Delete and re-import estates whose images changed.
enablePartialRemove bool Soft-delete instead of removing the post: keep the estate and the main image, set wpis_soft_deleted.

Shortcodes

Key Type Default Description
enableVueShortcodes bool false Load the public listing shortcode assets (Vue). Leave off if those shortcodes are unused.

Internal / unused

Key Type Default Description
cronKey string Generated when automation is enabled Secret token for cron URLs and GET /wp-json/wpis/blocked-submissions?token=. Do not commit this value to a public repository.
estatePageId mixed Accepted by the admin settings save endpoint. Unused at runtime.