wc_delete_variation: delete a variation
Removes one variation. The only deletion tool in the product set — there is no way to delete a product itself through MCP.
Arguments
| Argument | Required | Meaning |
|---|---|---|
id |
Yes | The variation |
force |
No | Delete permanently instead of trashing |
Note that there is no dry_run here.
Permissions
Allow WooCommerce catalog writes open, plus manage_woocommerce or edit_products.
force decides whether this is recoverable
Without it, the variation goes to the trash and can be restored from the WordPress admin.
With force: true, it is gone. Nothing in POM AI can bring it back, and variations have no revision history, so the only record of its price, SKU and stock is whatever you read beforehand.
Default to trashing. Reserve force for cleaning up variations you created by mistake minutes earlier.
There is no dry run, so read first
Every other write in this chapter can be previewed. This one cannot: the call either trashes or deletes.
That makes the read step mandatory rather than advisory:
Read variation 2204 and show me every field, then wait.
Once you have confirmed it is the right one, delete it.
Deleting changes what customers can buy
A variation is a purchasable combination. Removing it removes that option from the product's selector.
Consequences worth checking before you delete:
- The product's price range shifts if you removed the cheapest or dearest combination.
- The combination becomes unavailable, and customers who had it in a cart or a wishlist lose it.
- Feeds and marketplaces referencing that variation's SKU will start reporting a missing item.
- Deleting every variation leaves a variable product with nothing to sell — it still displays, and nothing can be added to a cart.
That last one is easy to reach by accident with an instruction like "remove the discontinued sizes".
Confirm which one by its attributes
IDs are interchangeable-looking; attribute combinations are not.
Delete the variation for size L in blue on product 219 — tell me its ID and confirm the attributes before deleting.
Working from a stale list of IDs is how the wrong variation gets deleted.
Out of stock is not the same as discontinued
If a combination is temporarily unavailable, set its stock to zero rather than deleting it. Deleting loses the SKU, the price and any external references; stock zero is reversible and keeps the product's structure intact.
Delete only when the combination is genuinely never coming back.
After deleting
- List the remaining variations and confirm the set is what you expect.
- Open the product page and check the selector.
- Check the displayed price range.
- Purge the cache, then the CDN.
Common problems
| Symptom | Cause |
|---|---|
| The write is refused | Catalog write gate closed |
pom_ai_mcp_wc_variation_not_found |
Wrong ID, or the ID is a product |
pom_ai_mcp_wc_forbidden |
Missing shop capability |
| It cannot be restored | force was used |
| The product cannot be bought at all | Every variation was deleted |
| The price range looks wrong | The cheapest or dearest combination was removed |
| The selector still offers it | Cache not purged |
Related
wc_get_variation— read before deletingwc_update_variation— the reversible alternative- Manage product variations