By Fahad Murtaza · Published · Updated
Manage WooCommerce orders and shipping with undo
WP MCP Pro’s WooCommerce operations catalog lets an agent do the store chores that used to need a person in wp-admin: fix an order, set up shipping, wire a webhook. Every change to existing state is snapshotted first.
What you need
- WP MCP Pro, connected to your AI client, and WooCommerce active.
- The agent uses three abilities:
woo-ops(the catalog),woo-readandwoo-write, each driven by anopname andparams.
Edit an order
› Order 4183 should have two of the blue mugs, not one, and add a $5 handling fee.
The agent reads the order with woo-read op orders.get, then calls
woo-write op orders.update with the changed line_items and fee_lines.
Totals are recalculated. The whole order is snapshotted first, so
rollback-operation restores it exactly. Status changes still go through
update-order-status.
Create an order
› Create a phone order for customer 57: one large tote, shipped to 12 Main St, Springfield.
orders.create builds the order through WooCommerce’s own order classes. No
payment gateway is ever called: set_paid and transaction_id are refused, and
the payment method is a label. Rolling the create back trashes the order.
Set up shipping
› Add free shipping over $75 to the United States zone, and a $6 flat rate below that.
The agent lists zones with shipping.zones, then uses shipping.add-method
for free_shipping and flat_rate. Settings are validated against each
method’s own settings form, so a flat rate cost that would not evaluate is
refused before anything is written. Writes are limited to the core flat rate,
free shipping and local pickup methods. Each write snapshots the whole zone, so
one rollback puts the zone back as it was. Deleting a zone or removing a method
is destructive: it is off until your site opts in with the
wpmcp_woo_op_enabled filter, and needs confirm: true.
Wire a webhook
› Send order.created events to https://hooks.example.com/orders.
webhooks.create requires a public https delivery URL that passes an SSRF
check, refuses custom action.* topics, and generates a signing secret you
never see in a response. webhooks.pause stops deliveries without deleting the
webhook.
Undo a whole session
Pass several changes as a batch and they share one session_id, so
rollback-session unwinds all of them.
Common questions
Can an AI agent edit a WooCommerce order?
Yes. With WP MCP Pro the agent reads the order with woo-read op orders.get and changes it with woo-write op orders.update, for example line items or fee lines. Totals are recalculated and the whole order is snapshotted beforehand.
Does the agent charge customers or call my payment gateway when it creates an order?
No. orders.create builds the order through WooCommerce's own order classes and never calls a gateway. The set_paid and transaction_id fields are refused, and the payment method is only a label.
How do I undo a change the AI made to an order or a shipping zone?
Run rollback-operation with that change's operation_id to restore the snapshot. For an order create, the rollback trashes the order. A shipping write snapshots the whole zone, so one rollback puts the zone back as it was.
Which shipping methods can the agent add?
Writes are limited to the core flat rate, free shipping and local pickup methods. Settings are validated against each method's own settings form, so a flat rate cost that would not evaluate is refused before anything is written.
Can the agent delete a shipping zone or a shipping method?
Not by default. Deleting a zone or removing a method is destructive, so it stays off until your site opts in with the wpmcp_woo_op_enabled filter, and each call also needs confirm set to true.
How do I create a WooCommerce webhook with an AI agent?
The webhooks.create op needs a public https delivery URL that passes an SSRF check, and it refuses custom action.* topics. WP MCP generates the signing secret and never shows it in a response, and webhooks.pause stops deliveries without deleting the webhook.
All WP MCP guides, or see every plugin integration. Topic: WooCommerce.