WP Residence Help WP Residence Help

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

WPResidence CRM Settings — Developer Reference

12 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.
13. 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

WP Residence Documentation

  • 01. Getting Started
    • How to Get Support
    • Get your buyer license code.
    • Use SSL / https
    • Server / Theme Requirements
  • 02. Installation & Setup
  • 03. Installation FAQ
  • 06. Search & Filtering
    • Advanced Search Display Settings
    • Advanced Search Form
    • Geolocation Search for Half Map
    • Save Search Theme Options
    • Advanced Search Colors
  • 09. Agent, Agency & Developers
  • 08. Property Pages & Layouts
  • 07. Property Lists, Categories & Archive
  • 14. WPResidence Elementor Studio
  • 10. Blog Posts & Blog List
  • 11. Shortcodes
    • Contact Form
    • Featured Agency/Developer
    • Membership Packages
    • Testimonials
    • Google Map with Property Marker
    • Listings per Agent, Agency or Developer
    • Display Categories
    • Agent List
    • Recent Items Slider
    • Recent items
    • List Properties or Articles by ID
    • Featured Agent
    • Featured Article
    • Featured Property
    • Login & Register Form
    • Icon Content Box Shortcode
  • 12. Widgets
  • 04. Theme Options & Global Settings
    • General Settings
    • User Types Settings
    • Appearance
    • Logos & Favicon
    • Header
    • Footer Style and Colors
    • Price & Currency
    • Property Custom Fields
    • Features & Amenities
    • Listing Labels
    • Theme Slider
    • Permalinks
    • Splash Page
    • Social & Contact
    • Map Settings
    • Pin Management
    • How read from file works
    • General Design Settings
    • Custom Colors Settings
    • Header Design & Colors
    • Mobile Menu Colors
    • User Dashboard Colors
    • Print PDF Design
    • Property, Agent, Blog Lists Design Settings
    • Sidebar Widget Design
    • Font management
    • How to add custom CSS
    • Custom Property Card Unit – Beta version
    • Email Management
    • Import & Export theme options
    • reCaptcha settings
    • YELP API Integration
    • iHomefinder Optima Express IDX
    • MEMBERSHIP & PAYMENT Settings
    • Property Submission Page
    • PayPal Setup
    • Stripe Setup
    • Wire Transfer Payment Method
  • 20. Translations & Languages
  • 26. FAQ
  • 10. Pages
  • 11. Header
  • 12. Footer
  • 05. Maps & Location Settings
  • 18. Payments & Monetization
  • Plugins
    • 19. Included Plugins
    • 22. Third Party Plugins – IDX Compatibility
    • 21. Third-Party Plugins – Multi-Language
    • 23. Third party Plugins – Other
  • Technical
    • 24. Technical how to | Custom Code Required
    • 25. Technical: Child Theme

Join Us On

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