30 days free. No credit card. Full access from the moment you connect your site.

Start free trial

Update Variation

store/update-variation changes a single variation: its price, SKU, status, weight or stock.

It then re-syncs the parent product, so the price range shown on the shop follows.

At a glance

Abilitystore/update-variation
ToolsetWooCommerce — toolset/woocommerce
GroupWooCommerce › Products & Variations
RequiresWooCommerce, active on the site
Capabilitymanage_options
SafetyWrites data
RepeatableIdempotent — running it twice leaves the same result
Ships inAcrossAI Abilities Manager 0.0.34 and later

The parent has to be told

A variable product does not store its own price. It displays a range derived from its variations, and that range is computed and cached during a sync step on the parent.

Change a variation’s price without syncing and the variation is correct, the parent still advertises the old range, and the shop shows a price nobody can actually buy at. This ability runs the sync afterwards, every time.

WooCommerce’s own product update works on products, not variations, so this is the only correct route to one.

The stock fields carry the suite’s recurring caveat: manage_stock on a variation decides whether it tracks its own stock or draws on the parent’s. Setting a quantity on a variation that does not manage its own stock writes a number nothing reads. store/get-stock says which record is authoritative.

Input

NameTypeRequiredWhat it is
idintegerYesVariation ID.
regular_pricestringNoRegular price.
sale_pricestringNoSale price.
skustringNoStock keeping unit.
statusstringNopublish or private.
weightstringNoWeight.
manage_stockbooleanNoWhether this variation tracks its own stock rather than the parent’s.
stock_quantityintegerNoStock quantity, when this variation manages its own.

What comes back

NameTypeWhat it is
productobjectThe variation after the write.
lookup_stateobjectWhether the product lookup table still agrees with the product after the write. A mismatch means the shop is answering SKU searches, price sorts and on-sale queries with stale values.
successbooleanWhether the call completed.
messagestringA one-line summary of what happened, suitable for showing a human.
error_codestringPresent only on failure — a stable machine-readable reason, such as a missing field, a wrong field type or an unmet confirmation.

Example

Ask your assistant:

Set the price on the large black t-shirt variation.

It resolves to one call:

{
  "ability": "store/update-variation",
  "parameters": {
    "id": 8134,
    "regular_price": "24.00"
  }
}

Worth knowing

  • The parent is re-synced automatically. Its displayed range follows.
  • Setting a quantity on a variation that does not manage its own stock writes a number nothing reads.
  • Idempotent.
  • A variation with no price cannot be bought.

Related abilities


Get the plugins:
AcrossAI Abilities Manager · AcrossAI MCP Manager

Browse the rest: Every ability, by category


Keep reading