store/get-coupon reads one coupon by its code — the string a customer actually types — including usage against its limit and its product and category restrictions.
Coupons are addressed by code rather than by ID throughout this suite.
At a glance
| Ability | store/get-coupon |
| Toolset | WooCommerce — toolset/woocommerce |
| Group | WooCommerce › Coupons |
| Requires | WooCommerce, active on the site |
| Capability | manage_options |
| Safety | Read-only — changes nothing |
| Repeatable | Idempotent — running it twice leaves the same result |
| Ships in | AcrossAI Abilities Manager 0.0.34 and later |
How it works
Addressing by code is the right choice because the code is the thing everybody has. A customer emails saying WELCOME10 is not working; nobody knows or cares what post ID that is.
The usage figures are what answer most coupon questions. A code that “stopped working” has usually hit its total usage limit, or its per-customer limit for that customer, or its expiry — and all three are here.
The restrictions are the other common answer: a coupon limited to certain products or categories appears not to work when applied to a cart that contains none of them, with no explanation at checkout beyond a generic refusal.
Minimum and maximum spend belong to the same family of invisible reasons.
Input
| Name | Type | Required | What it is |
|---|---|---|---|
code | string | Yes | The coupon code. |
What comes back
| Name | Type | What it is |
|---|---|---|
coupon | object | Code, type, amount, expiry, usage count and limits, minimum and maximum spend, and product and category restrictions. |
success | boolean | Whether the call completed. |
message | string | A one-line summary of what happened, suitable for showing a human. |
error_code | string | Present only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation. |
Example
Ask your assistant:
Why has WELCOME10 stopped working?
It resolves to one call:
{
"ability": "store/get-coupon",
"parameters": {
"code": "WELCOME10"
}
}Worth knowing
- Addressed by code, not ID.
- A coupon that “stopped working” has usually hit a limit or an expiry.
- Product and category restrictions are a common invisible cause.
Related abilities
- Update Coupon — raise a limit or extend an expiry
- List Coupons — everything configured
Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager
Browse the rest: Every ability, by category