Uhm, it may actually be interesting to check state before setting it to on-hold.
I would add a condition `STATE_CHECKOUT === $unit->getInventoryState()` before changing the state + for counting the quantity for the `inventoryOperator::hold` just after.
What do you think?

The aim is to make it possible to trigger more than once this method without any risk (I'm thinking of viewing more than once the finalize step for example).