Inicio - Documentación - POM AI - 18 MCP - WooCommerce coupon tools - `wc_get_coupons`: list coupons

wc_get_coupons: list coupons

Lists the shop's coupons.

Arguments

Argument Required Meaning
status No Post status; defaults to publish
per_page No How many, clamped to 1–100

Permissions

mcp:read and woocommerce:catalog:read, plus manage_woocommerce or edit_shop_coupons.

What it returns

items, each with id, code, discount_type, amount and usage_limit.

That is the whole listing. Five fields.

What it does not tell you

The four fields that decide whether a coupon matters are all missing:

  • date_expires — so you cannot see which coupons are dead.
  • description — so you cannot see what a code was for.
  • individual_use — so you cannot see which ones block stacking.
  • product_ids — so you cannot see which ones are restricted to particular products.

All four come from wc_get_coupon, one call per coupon.

The expiry omission is the one that misleads. A listing of forty coupons looks like forty live offers, and most of them may have expired last year. An assistant summarising "the shop's active discounts" from this listing alone is guessing.

List the coupons, then read each one and tell me which have expired.

No total, and a hard cap

per_page clamps to 100 and the response carries no total. A shop with more than 100 coupons in the requested status returns 100 of them, silently.

There is no page argument here — unlike the product listing, this tool does not paginate. To find out whether you saw everything, use wc_get_coupon_count.

That combination — capped at 100, no pagination, no total — means a large coupon archive is not fully readable through this tool. Narrow by status instead.

status defaults to publish

Only published coupons are returned unless you ask otherwise. Drafts and trashed coupons are invisible by default.

Useful values:

  • publish — live codes.
  • draft — prepared but not active.
  • trash — deleted but not purged; these still occupy their codes.

That last point catches people: a trashed coupon still holds its code, so recreating SUMMER25 fails while the old one sits in the trash.

amount needs its discount_type to mean anything

An amount of 10 is ten percent or ten euros depending on discount_typepercent, fixed_cart or fixed_product.

Reading the amount without the type is how a 10% coupon gets described as "€10 off". Both fields are in the listing; use both.

Using it well

List the published coupons with their codes, types and amounts.

Show me the draft coupons.

Before creating one:

List the coupons in every status and tell me whether SUMMER25 already exists.

Common problems

Symptom Cause
The tool is missing WooCommerce is not active
pom_ai_mcp_wc_forbidden Missing manage_woocommerce or edit_shop_coupons
A coupon you know exists is absent It is a draft or trashed; status defaults to publish
Exactly 100 results The cap; narrow by status
No expiry dates Not in the listing; read each coupon
An amount that seems wrong Check discount_type

Related