X
🐾 Coming from PetMatchPro 6.x? Version 8 adds real adoption analytics, similar-animal suggestions, SEO-friendly URLs, and overlay badges. See What's New →
PetMatchPro
  • Partners
    • AnimalsFirst
    • PetPoint
    • RescueGroups
  • What’s New
  • Shop
  • Demo
  • FAQ
  • Knowledge Base
  • About Us
  • Contact Us
  • My Account
  • Cart
Select Page
Green rocket icon for Getting Started documentation category

Getting Started

6
  • Activate Your License
  • Setup Wizard Walkthrough
  • Connecting Your Shelter System
  • Understanding License Tiers
  • Creating Your First Search Page
  • Creating Your First Detail Page
Blue code brackets icon for Shortcodes and Configuration documentation category

Shortcodes & Configuration

12
  • Shortcode Builder
  • [pmp-search] Reference
  • [pmp-details] Reference
  • [pmp-detail] Reference
  • [pmp-option] Reference
  • Parameters by License Tier
  • Common Shortcode Recipes
  • Pagination Setup
  • Excluding Values
  • Search Filter Button
  • Detail Button Hover Text
  • Search Card Hover Text
Purple palette icon for Templates and Design documentation category

Templates & Design

7
  • Search Templates Gallery
  • Detail Templates Gallery
  • Poster Templates
  • Theme Template Overrides
  • Color Customization
  • Font Size Customization
  • Detail Title Formats
Orange image with star icon for Icons and Overlays documentation category

Icons & Overlays

6
  • Understanding Pet Icons
  • Understanding Overlays
  • Icon Reference Gallery
  • Customizing Icon Display
  • Value-Based Icons
  • Icon Size Customization
Teal tag icon for Labels and Customization documentation category

Labels & Customization

3
  • Custom Labels Guide
  • Changing Labels via Filtering
  • Custom Currency & Date Formats
Blue funnel icon for Filters and Search documentation category

Filters & Search

5
  • Setting Up Search Filters
  • Species & Breed Filtering
  • Filter Value Management
  • Excluding Values via Filtering
  • Partner-Specific Filter Options
Violet chain link icon for Partner Integration Guides documentation category

Partner Guides

3
  • AnimalsFirst Integration Guide
  • PetPoint Integration Guide
  • RescueGroups Integration Guide
Red bar chart icon for Analytics and Tracking documentation category

Analytics & Tracking

7
  • Understanding PMP Analytics
  • GA4 Configuration
  • Google Tag Manager Setup
  • Leveraging Analytics
  • WP-Cron Requirements for PetMatchPro Analytics
  • Queue Health and Tools
  • Privacy and Data Retention
Amber wrench icon for Troubleshooting and FAQ documentation category

Troubleshooting

15
  • Common Error Messages
  • API Connection Issues
  • Template Not Found Errors
  • Theme Template Override Not Loading
  • Performance & Caching Best Practices
  • Animals Not Displaying
  • Stale Content / Cache Issues
  • Styling Conflicts
  • Empty Field Display
  • Analytics Queue Stuck or WP-Cron Not Running
  • Premium Feature Not Appearing After Upgrade
  • Troubleshoot the PetMatchPro Shortcode Builder
  • Reading PMP Debug Logs
  • wp-config.php Configuration Constants
  • How to Contact Support
Lightbulb icon representing PetMatchPro best practices guides for homepage layouts, button strategy, performance tuning, and template selection

Best Practices

10
  • Featuring Animals on Your Homepage
  • Adding Animals to Sidebars and Other Pages
  • Using Banners and Subtitles Effectively
  • Overlays and Icons for Quick Visual Cues
  • Writing Effective Detail Page Instructions
  • Button Configuration for Conversion
  • Optimizing Performance with API Caching
  • Customizing Typography and Icon Sizes
  • Lost and Found Search Best Practices
  • Template Selection Guide
View Categories
  • Home
  • Knowledge Base
  • Troubleshooting
  • wp-config.php Configuration Constants

wp-config.php Configuration Constants

1 min read

wp-config.php Configuration Constants #

PetMatchPro reads a small set of optional define() constants from wp-config.php. These are operator-only kill switches, rollback toggles, and debugging hooks – none are required for normal plugin operation.

Use these when you need a site-wide effect that does not require a theme or mu-plugin file edit, or when you want a configuration to survive theme switches and plugin updates.

How to Add a Constant #

Open wp-config.php at the root of your WordPress install. Add the define() line above this comment block:

/* That's all, stop editing! Happy publishing. */

Adding constants below that line is supported by WordPress but conventionally avoided. Adding them above is the safe location.

Important: add_filter() and other WordPress functions are not available in wp-config.php because the file runs before WordPress core loads. Calling add_filter() there produces a fatal error and a 500 page. Use define() for the constants on this page; use add_filter() in your theme’s functions.php or in an mu-plugin file.

Constant Reference #

PMP_ANALYTICS_LEGACY_READS #

Since: 8.9.6
Type: boolean
Default: not defined (uses 8.9.4+ daily-table reads)

When defined and truthy, three dashboard read methods that were migrated to the daily summary table in 8.9.4 fall back to their pre-8.9.4 raw-events implementation:

  • getTotalEvents() / getTotalEventCount() – reverts SUM(event_count) FROM daily to COUNT(*) FROM events
  • getAnimalsNeedingAttention() – the Insights “Animals Needing Attention” panel
  • getStaleListings() – the Insights “Declining Click Rates” panel

Use as a one-line rollback if a migrated widget shows surprising numbers and you want to compare against the legacy implementation while the issue is investigated. Reverts on the next request – no plugin downgrade or restart needed.

// wp-config.php
define( 'PMP_ANALYTICS_LEGACY_READS', true );

Equivalent filter (use this if you cannot edit wp-config.php):

// theme functions.php or wp-content/mu-plugins/pmp-legacy.php
add_filter( 'pmp_analytics_legacy_reads', '__return_true' );

The constant takes precedence over the filter when both are set.

To turn the rollback off, either remove the define() line or change the value to false.

Adding Future Constants #

This page is the canonical reference for plugin constants. When PetMatchPro adds a new define() hook in a future release, the constant appears here with its full description, expected type, default behavior, and a code example. The same constant is also summarized in the plugin’s readme.txt “Configuration Constants” FAQ section that ships with every release.

Related #

  • Analytics Queue and WP-Cron Issues – cron-side diagnostics
  • Performance and Caching Best Practices – related plugin-side caching toggles
  • Contact Support – if a constant does not have the expected effect
wp-config.php Configuration Constants ultima modifica: 2026-05-05T20:17:25-04:00 da PetMatchPro
Updated on May 5, 2026

What are your Feelings

  • Happy
  • Normal
  • Sad

Share This Article :

  • Facebook
  • X
  • LinkedIn
  • Pinterest
Reading PMP Debug LogsHow to Contact Support

Submit a Comment Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents
  • wp-config.php Configuration Constants
    • How to Add a Constant
    • Constant Reference
      • PMP_ANALYTICS_LEGACY_READS
    • Adding Future Constants
    • Related

© Copyright 2018-2026 by PetMatchPro, All Rights Reserved

  • Privacy Policy
  • Terms of Use
  • Disclaimer
  • Login