Delete Order


Deletes a WooCommerce order. By default this moves it to the trash; pass force to delete it permanently, bypassing the trash.

Also known as: remove an order.

Property Value
Ability slug mosmcp/delete-order
Wire tool name mosmcp__delete-order
Category WooCommerce (mosmcp-woocommerce)
Plan Free

 

Required access

Requirement Value
Capability delete_shop_orders
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 order 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 test order 1049.

Example request (json)

{
  "jsonrpc": "2.0",
  "id": 363,
  "method": "tools/call",
  "params": {
    "name": "mosmcp__delete-order",
    "arguments": {
      "input": {
        "id": 1049
      }
    }
  }
}

Example response (json)

{
  "jsonrpc": "2.0",
  "id": 363,
  "result": {
    "isError": false,
    "structuredContent": {
      "success": true,
      "message": "Order moved to trash.",
      "data": {
        "id": 1049,
        "status": "trashed"
      },
      "meta": {
        "ability": "mosmcp/delete-order",
        "timestamp": "2026-09-29T10:15:00+00:00",
        "execution_time": "18.4ms"
      }
    }
  }
}

 

Edge cases / errors

  • Default moves the order to the trash (status "trashed"); force: true deletes it permanently (status "deleted").
  • Unknown order → wcab_order_not_found; no permission to delete that order → wcab_cannot_delete.
  • WooCommerce refuses the delete → wcab_order_delete_failed. Deleting does not refund the customer.

 


<< Previous Next >>
Delete Customer Delete Product

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.