WhoKnew Views™ | Overriding Global Settings

Skip to main content
Table of Contents
Print

Master the settings hierarchy to give individual products unique configurations while maintaining store-wide defaults

Every WooCommerce store has products that need different treatment. A bestseller might need aggressive social proof, while a slow-moving item needs conservative padding. WhoKnew Views™ Pro solves this with a cascading settings system that lets you override global settings on a product-by-product basis without losing your store-wide defaults.

🔒 PRO FEATURE — Requires WhoKnew Views™ Pro


🏗️ The Settings Hierarchy

When WhoKnew Views™ displays a view counter, it determines which settings to use by checking multiple sources in priority order:

1

👁️ Admin Preview Mode

Temporary settings admins see when testing via ?wkv_preview=1

2

🎯 Per-Product Custom Settings

Product-specific overrides from the Product Meta Box (this article)

3

🌍 Global Settings

Site-wide defaults from WhoKnew → WhoKnew Views tabs

4

📋 Plugin Defaults

Hardcoded fallbacks ensuring all settings have values

ℹ️ How Priority Works: Higher levels override lower levels. If a product has custom settings enabled, those values take precedence over global settings. If a specific setting isn’t defined at a higher level, it falls through to the next level.


⚙️ How Overrides Work Technically

The override system uses PHP’s array_merge() function to layer settings:

// Settings resolution logic (simplified)

$defaults

= whoknew_views_get_default_settings();

$global

= wp_parse_args($saved_settings, $defaults);

if ($use_custom) {
// Product settings override global
$options = array_merge($global, $custom_settings);
}

Key behavior: When you enable custom settings for a product, the system starts with global settings and then overlays your custom values on top. Any setting you don’t explicitly customize will inherit from global.


✅ What Can Be Overridden Per-Product

The Product Meta Box allows you to override these settings for individual products:

⚙️ General Tab

  • ⏱️ View Counting Window (hours)
  • 🎲 Number Padding Toggle
  • 🎯 Growth Control Strategy
  • 📊 Starting Padding Range (min/max)
  • 🔒 Soft Cap Toggle & Value
  • 📉 Min/Max Display Limits
  • 💬 Display Text Template
  • 🕐 Refresh Cooldown (minutes)
  • 🍪 Cookie Lifespan (hours)

📊 Variation Tab

  • 📊 Low Range Variation (min/max)
  • 📊 Medium Range Variation (min/max)
  • 📊 High Range Variation (min/max)
  • ⚡ Probability Threshold 1
  • ⚡ Probability Threshold 2
  • 📉 Drop Rate Low/High
  • 📈 Traffic Threshold
  • 🔒 Limit Real View Drops

⚠️ Not Overridden Per-Product: Styling settings (colors, fonts, icons, positioning) are NOT part of the Product Meta Box. Per-product styling is configured separately via the Styling tab’s “Apply Settings To” dropdown.


🔄 The Enable/Disable Toggle Behavior

The “Use Custom Product Settings” checkbox controls whether overrides are active:

Checkbox StateBehaviorCustom Settings Data
☑️ CheckedProduct uses custom settings → overrides globalActive and applied
☐ UncheckedProduct uses global settings → ignores customPreserved but inactive

💡 Non-Destructive Design: Unchecking the box doesn’t delete your custom settings—it simply tells the product to use global settings instead. Your custom configuration is preserved and can be re-enabled instantly by checking the box again.


🎯 When to Use Per-Product Overrides

🌟

Bestsellers

Use aggressive presets with high padding ranges to match the natural high traffic these products receive.

🆕

New Arrivals

Use momentum presets to create immediate social proof before organic traffic kicks in.

🐌

Slow Movers

Use conservative presets with lower ranges so padding doesn’t outpace real traffic suspiciously.

💎

Premium Items

Use soft caps to prevent view counts from reaching “too popular” levels for luxury positioning.

📆

Seasonal Products

Adjust view windows and drop rates based on seasonal traffic patterns unique to each product.

🧪

A/B Testing

Test different padding strategies on specific products before rolling out changes store-wide.


🔒 Special Behavior: Automatic Override Creation

In certain scenarios, WhoKnew Views™ Pro will automatically create custom product settings to protect your store:

🛡️ Hard Cap Drift Auto-Conversion

When a product using global settings hits the 95% soft cap threshold and needs to enable drift mode, the system automatically converts it to custom settings first. This prevents drift settings from modifying the global configuration and affecting all other products.

// Auto-conversion when enabling drift near soft cap

if (!$use_custom) {
update_post_meta($product_id, ‘_wkv_use_custom_settings’, ‘true’);
update_post_meta($product_id, ‘_wkv_custom_settings’, $options);
// Product now has its own drift settings
}


📦 Database Storage

Per-product settings are stored as WordPress post meta:

Meta KeyValue TypePurpose
_wkv_use_custom_settings‘true’ or emptyToggle flag for custom settings
_wkv_custom_settingsSerialized arrayAll custom setting values
_wkv_preset_nameStringName of last applied preset
_wkv_has_custom_product_settings‘true’ or emptyDistinguishes product settings from styling

⚠️ License Deactivation Behavior

If your WhoKnew Views™ Pro license is deactivated, all per-product custom settings are:

  1. Backed up to whoknew_views_pro_product_settings_backup
  2. Removed from active product meta
  3. Restored automatically when you reactivate your license

💚 Your Data is Safe: Even if your license lapses, your carefully configured per-product settings are preserved and will be restored when you renew. No need to reconfigure products manually.


🎯 Best Practice: Start Global, Override Strategically

Configure your global settings to work well for the majority of your products (typically 80%). Then use per-product overrides only for products that genuinely need different treatment. This keeps your store maintainable while giving you precise control where it matters most.

Share