Ir al contenido

Coupon Audit and Analytics for WooCommerce

Version0.2.1
RequiresWordPress 6.4+ · WooCommerce 10.3+
PHP8.1+
LicenseGPLv3
Updated2026-07-30

Coupon Audit and Analytics for WooCommerce audits your coupon inventory —what is live, what it really applies to, what overlaps and what has been orphaned— and measures what each coupon actually earns. It rests on two pillars of equal standing: Audit needs no cost data and works on day one in every store; Analytics resolves revenue, cost of goods and discount into a per-coupon margin, degrading gracefully wherever cost data is missing rather than presenting an unreliable number as a reliable one.

The problem

Stores accumulate coupons over time: promotions that were never turned off, codes that apply to everything, half-expired campaigns, coupons that step on each other. WooCommerce lets you create coupons, but it won’t tell you which ones are still live, what they actually apply to, or which ones overlap. Let alone what each one costs you.

Audit — no cost data needed

Lists every coupon in the store with its real status, what it actually applies to, and what is wrong with it:

  • Never expires — live with nothing scheduled to ever turn it off.
  • Dormant — live but unredeemed for longer than the threshold.
  • Dead campaign — live while every other code from its campaign has expired.
  • Applies to everything — live with no product or category restriction at all.
  • Overlaps — two live coupons that can both apply to the same product, graded by how likely the collision really is. Nothing in WooCommerce compares one coupon against another, so this finding is not reachable any other way.

Status is derived, never stored: a coupon that expired overnight says so the next morning. The same findings appear on the coupon edit screen itself, and they never block a save — they inform, and you decide.

Analytics — per-coupon margin

For each coupon: revenue, what it gave away, the cost of the goods it moved, and the gross margin left over, over the last 30 days. This half needs cost data, and it is honest about not having it: because WooCommerce’s own cost-of-goods feature is off by default, the plugin also reads the cost systems shops actually use —WooCommerce’s built-in Cost of Goods (10.3 and later), Cost of Goods for WooCommerce by WPFactory, WooCommerce Cost of Goods and Booster—, always from one of them, never a mixture. Where cost is only partly known, the margin says so and states how much of it is covered, rather than presenting an unreliable number as a reliable one.

Extensible

It exposes filters to integrate with other plugins. For example, dfxcaaw_coupon_is_auto_applied lets you flag coupons that apply automatically without the customer entering them — an overlap between two auto-applied coupons is the most serious finding the audit produces. HPOS and cart/checkout blocks compatibility is declared explicitly.

Quality and architecture

Strict test-driven development, PHPStan level 8 and a domain with no WordPress dependencies: the business logic is tested without a database or a bootstrap, and the unit suite stays under two seconds. Time, the database, licensing and cost sources are always injected behind an interface.

01

Audit with no cost data

Lists every coupon with its real status —never expires, dormant, dead campaign, applies to everything— and works on day one in any store.

02

Overlap detection

Compares each live coupon against the others and grades how likely the collision really is; nothing in WooCommerce makes that comparison.

03

Per-coupon margin

Resolves revenue, cost of goods and discount into a real 30-day margin; where cost is missing it says so rather than faking a reliable number.

04

Reads your cost system

Takes cost from WooCommerce, WPFactory Cost of Goods, WooCommerce Cost of Goods or Booster —from one only, never mixed.

05

Warnings where they matter

The same findings show on the coupon edit screen and never block a save: they inform, you decide.

06

Extensible and compatible

Filters such as dfxcaaw_coupon_is_auto_applied, plus HPOS and cart/checkout blocks compatibility declared explicitly.

wp plugin install https://github.com/davefx/coupon-audit-and-analytics-for-woocommerce/releases/download/0.2.1/coupon-audit-and-analytics-for-woocommerce-0.2.1.zip --activate

Or download the ZIP and install it from Plugins → Add New.