Delete Coupon
Deletes a WooCommerce coupon. By default this moves it to the trash; pass force to delete it permanently, bypassing the trash.
Also known as: remove a discount code.
| Property | Value |
|---|---|
| Ability slug | mosmcp/delete-coupon |
| Wire tool name | mosmcp__delete-coupon |
| Category | WooCommerce (mosmcp-woocommerce) |
| Plan | Free |
Required access
| Requirement | Value |
|---|---|
| Capability | delete_shop_coupons |
| Minimum default role | Shop manager |
| Requires | WooCommerce |
| Annotations | readOnly: false · destructive: true · idempotent: true · openWorld: false |
Input schema
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| id | integer | Yes | — | The coupon ID to delete (required). |
| force | boolean | false |
Permanently delete instead of moving to trash. Defaults to false. |
Output schema
| Field | Type | Required |
|---|---|---|
| success | boolean | |
| message | string | |
| data | object | |
| data.id | integer | Yes |
| data.status | string | Yes |
| meta | object | |
| meta.ability | string | |
| meta.timestamp | string | |
| meta.execution_time | string \| null |
Example
Sample prompt
Delete coupon 210.
Example request (json)
{
"jsonrpc": "2.0",
"id": 361,
"method": "tools/call",
"params": {
"name": "mosmcp__delete-coupon",
"arguments": {
"input": {
"id": 210
}
}
}
}Example response (json)
{
"jsonrpc": "2.0",
"id": 361,
"result": {
"isError": false,
"structuredContent": {
"success": true,
"message": "Coupon moved to trash.",
"data": {
"id": 210,
"status": "trashed"
},
"meta": {
"ability": "mosmcp/delete-coupon",
"timestamp": "2026-09-29T10:15:00+00:00",
"execution_time": "18.4ms"
}
}
}
}
Edge cases / errors
- Default moves the coupon to the trash (status "trashed"), after which it no longer works at checkout; force: true deletes it permanently.
- Unknown coupon → wcab_coupon_not_found; no delete rights on it → wcab_cannot_delete.
- WooCommerce refuses the delete → wcab_coupon_delete_failed.
| << Previous | Next >> |
|---|---|
| Customers Report | Delete Customer |
For more information about the Secure MCP Server for WordPress plugin, explore the following resources:
Product Overview | Pricing | Try for Free | Documentation
If you have any questions regarding plugin configuration, pricing plans or licensing, please contact us or mail us at aisupport@xecurify.com.