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

Use dry_run: true to inspect the exact variation before requesting approval.

Permissions

Allow WooCommerce catalog writes open, plus catalog access and deletion permission for both the variation and its parent product. Product IDs are rejected.

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.

Preview and approve

Read the variation, then request a preview. The preview includes its current fields. A write request returns a review link; approve it as the original actor and resubmit the same arguments with approval_id. Confirm the returned deleted value and read the remaining variations.

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

  1. List the remaining variations and confirm the set is what you expect.
  2. Open the product page and check the selector.
  3. Check the displayed price range.
  4. 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