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
page No Page number, starting at 1

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.

Read every page

Results use ascending ID order and pages of up to 100. Increase page to continue. The response has no total. Only coupons the actor can edit are returned, so a restricted actor can receive a short page. Use wc_get_coupon_count to understand the status totals and check the requested scope.

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_type — percent, 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 Read the next page
No expiry dates Not in the listing; read each coupon
An amount that seems wrong Check discount_type