WP Residence Help WP Residence Help

  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API
Home / WPResidence / WPEstate CRM / WPResidence CRM Settings — Developer Reference

WPResidence CRM Settings — Developer Reference

58 views 0

Developer documentation for the settings layer of the WPResidence real estate CRM. Lives in libs/settings.php.

Option Storage

All settings live in a single serialized option: wpestate_crm_settings. One row in wp_options keeps the entire configuration, reducing option lookups.

Getter API

wpestate_crm_get_setting( $key, $default = '' )

Reads from the wpestate_crm_settings array. Returns the value if present and non-empty, otherwise $default.

Admin Menu

  • Parent menu: WPEstate CRM, slug wpestate-crm, position 4.5.
  • Submenu: Settings, slug wpestate-crm-settings.
  • Capability: manage_options.

Save Handler

wpestate_crm_save_settings()

Registered on admin_post_wpestate_crm_save_settings. Flow:

  1. Verify nonce action wpestate_crm_save_settings.
  2. current_user_can(‘manage_options’) check.
  3. Sanitize input per-field.
  4. wp_parse_args() merge into existing settings.
  5. update_option(‘wpestate_crm_settings’, $merged).
  6. Redirect to the referring tab with a success parameter.

Default Seeder

wpestate_crm_seed_defaults()

Called from the activation routine. Writes any missing keys with their default values but does not overwrite existing non-empty values – safe to re-run on every activation.

Full Key Map

Grouped by functional area:

Contact picklists

  • crm_contact_prefixes – Mr, Mrs, Ms, Dr, Prof
  • crm_contact_statuses – Active, Inactive, VIP, Blocked
  • crm_lifecycle_stages – New Lead, Contacted, Appointment Set, Active Client, Under Contract, Closed
  • crm_lead_sources, crm_lead_types, crm_lead_statuses – legacy, kept for compatibility
  • crm_enquiry_types – Property Enquiry, General Enquiry, Valuation Request, Viewing Request
  • crm_enquiry_statuses – New, Open, Responded, Closed

Deal picklists

  • crm_deal_stages, crm_deal_stage_colors – index-matched
  • crm_deal_statuses, crm_deal_next_actions, crm_deal_probabilities

Task picklists

  • crm_task_statuses, crm_task_types, crm_task_priorities

HubSpot

  • crm_hubspot_enabled, crm_hubspot_enabled_for_all, crm_hubspot_api_token, crm_hubspot_first_stage, hubspot_stage_map

Twilio

  • crm_twilio_enabled, crm_twilio_account_sid, crm_twilio_auth_token, crm_twilio_from_number
  • crm_notify_sms_new_contact_enabled, crm_notify_sms_new_contact_body

Webhooks

  • crm_webhook_url, crm_webhook_events

Global

  • crm_empty_value_text – default –

Deprecated Keys

These keys exist for back-compat but should not be relied on:

  • crm_gdpr_consent_enabled, crm_gdpr_consent_text – the theme’s GDPR banner is authoritative now.
  • crm_recaptcha_on_forms – never implemented.
  • crm_notify_email_* – email templates moved to Theme Options → Email Management → CRM Emails.

Test Integrations AJAX

Action Nonce
wpestate_crm_test_hubspot_connection wpestate_crm_test_hubspot
wpestate_crm_test_webhook wpestate_crm_test_webhook
wpestate_crm_send_test_sms via wpestate_crm_verify_ajax_nonce(‘send_test_sms’)

All three require manage_options.

Reading Picklists in Your Code

$stages = wpestate_crm_get_setting('crm_deal_stages'); $items = array_map('trim', explode(',', $stages));

Picklists are stored as comma-separated strings and parsed at use time. If you need an array-form API, wrap it in a helper in a child plugin.

Extending

  • Add your own settings by writing into the same wpestate_crm_settings option under a custom-prefixed key (for example, myplugin_crm_foo). The save handler accepts any POSTed key so the data survives a save-round-trip if you render an input with that name on the settings page.
  • Add a new tab by filtering the tab list in a child plugin and hooking a render callback for it.
WPResidence / WPEstate CRM

Related Articles

  • WPResidence CRM Security Model — Developer Reference
  • CRM Security and Data Privacy
  • WPResidence CRM Installation and Updates — Developer Reference
  • Installing and Updating the WPResidence CRM

Help Categories

  • 18Agent, Agency & Developers
  • 5Blog Posts & Blog Lists
  • 38Elementor Shortcodes Built-In
  • 45FAQ
  • 15Footer
  • 5Getting Started
  • 37Header
  • 2IDX & MLSImport
  • 6Installation & Setup
  • 23Installation FAQ
  • 23Maps & Location Settings
  • 21Multi-Language Third Party Plugins
  • 6Other Third party Plugins
  • 19Pages
  • 4Payments & Monetization
  • 20Property Lists, Categories & Archive
  • 36Property Pages & Layouts
  • 31Search & Filtering
  • 162Technical how to | Custom Code Required
  • 8Technical: Actions and filters
  • 6Technical: Child Theme
  • 86Theme Options & Global Settings
  • 6Translations & Languages
  • 16WPBakery Shortcodes
  • 51WPResidence / WPEstate CRM
  • 50WPResidence 5.0 Documentation
  • 8WPResidence Elementor Studio
  • 50WPResidence Translate Plugin

Join Us On

Powered by WP Estate - All Rights Reserved
  • WPRESIDENCE
  • Video Tutorials
  • Client Support
  • API