wc-variations-pricing-filters

Override WooCommerce variation prices via cross-layer filters with cache hash integrity.

21|1|Updated Apr 29, 2026
One-click install
npx skills add https://github.com/Lonsdale201/wp-agent-skills --skill wc-variations-pricing-filters
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: wc-variations-pricing-filters
Source: https://github.com/Lonsdale201/wp-agent-skills/tree/main/woocommerce/wc-variations-pricing-filters
Command: npx skills add https://github.com/Lonsdale201/wp-agent-skills --skill wc-variations-pricing-filters

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Mutate WooCommerce variation prices via filters to apply context-sensitive pricing without permanently changing stored values.

Core Features & Use Cases

  • Cross-layer pricing overrides across variation reads and price aggregation to keep catalog ranges in sync.
  • Hash-based caching safety by extending the variation prices hash to include per-user context (roles, flags) to avoid cross-user leakage.
  • Debugging and safe rule changes with cache busting when rules change.

Quick Start

Configure filters across the variation price paths and cache keys to apply per-user pricing without cross-user leakage.

Frequently Asked Questions about wc-variations-pricing-filters

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I override WooCommerce variation prices dynamically without changing stored values?▼

To override WooCommerce variation prices dynamically, apply cross-layer filters on the variation read and price-aggregation pipelines. This applies context-sensitive pricing rules per request without permanently mutating the stored product database values.

Why do my WooCommerce role-based variation prices leak between users?▼

Role-based variation prices leak between users when the WooCommerce price cache is shared across contexts. Extending the woocommerce_get_variation_prices_hash filter to include per-user roles and flags ensures cache isolation and prevents incorrect cross-user pricing.

What is the best way to apply time-based discounts to WooCommerce product variations?▼

The best way to apply time-based discounts to WooCommerce product variations is wiring context-aware filters across woocommerce_product_variation_get_price and woocommerce_variation_prices_price pipelines. This keeps catalog ranges and variation pages in sync with the active discount window.

Does WooCommerce cache dynamic variation prices globally across different user roles?▼

WooCommerce caches variation prices globally by default, which breaks dynamic role-based pricing. Modifying the variation prices hash to include user-specific context variables forces WordPress to generate and store separate cache entries for each role.

How do I keep WooCommerce catalog price ranges in sync with custom variation pricing rules?▼

To keep WooCommerce catalog price ranges in sync with custom pricing, apply filters across both the variation read and price-aggregation pipelines. Overriding woocommerce_variation_prices_regular_price and woocommerce_variation_prices_sale_price ensures the displayed range reflects user-specific overrides.

How to bust WooCommerce variation price cache when custom pricing rules change?▼

To bust WooCommerce variation price cache when custom pricing rules change, implement cache invalidation through the woocommerce_get_variation_prices_hash filter. Extending this hash with active rule flags ensures stale cached prices are automatically regenerated upon rule updates.