From 62f2240154fe4284b452ebab4aa2302b81ffd403 Mon Sep 17 00:00:00 2001 From: Daniel Kirkland <167744225+d-kirkland@users.noreply.github.com> Date: Tue, 13 Oct 2026 16:57:15 +0200 Subject: [PATCH] docs: name the third Transition parameter as the transition name, not the new state Co-Authored-By: Claude Sonnet 5.5 --- .../plugins/checkout/order/using-the-state-machine.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guides/plugins/plugins/checkout/order/using-the-state-machine.md b/guides/plugins/plugins/checkout/order/using-the-state-machine.md index 0b337cc399..338f69ad08 100644 --- a/guides/plugins/plugins/checkout/order/using-the-state-machine.md +++ b/guides/plugins/plugins/checkout/order/using-the-state-machine.md @@ -46,9 +46,9 @@ This ensures, that if Shopware would ever change a state's name, your changes wo This means the ID of the order, the order transaction or the order delivery entity. You can find those using the respective entities' repositories, find out more about those in general in our guide about [reading data](../../framework/data-handling/reading-data). There will a full example at the end of this guide as well. -* The third parameter is the new state to be transitioned to. -E.g. this could be `paid`, if the order is still `open`. -* The last parameter is the name of the `StateMachineStateField`. +* The third parameter is the name of the transition (action) to apply, for example `process` or `cancel` for an order (except in forced mode, see [Forcing a transition](#forcing-a-transition)). +The state machine determines the resulting state from the current state and this transition name. +* The fourth parameter is the name of the `StateMachineStateField`. If you have a look at the [order definition](https://github.com/shopware/shopware/blob/v6.3.4.1/src/Core/Checkout/Order/OrderDefinition.php#L106), you will find the respective field. This is the case for each of those definitions, the [order definition](https://github.com/shopware/shopware/blob/v6.3.4.1/src/Core/Checkout/Order/OrderDefinition.php#L106), the [order transaction](https://github.com/shopware/shopware/blob/v6.3.4.1/src/Core/Checkout/Order/Aggregate/OrderTransaction/OrderTransactionDefinition.php#L60) and the [order delivery](https://github.com/shopware/shopware/blob/v6.3.4.1/src/Core/Checkout/Order/Aggregate/OrderDelivery/OrderDeliveryDefinition.php#L79). Thankfully, this field is always called `stateId` in our default definitions.