ProductChange: validates the change exists and is still pending, then sets it to canceled with canceled_by and canceled_at — the staged actions are never applied to the master product. Triggered by POST /admin/product-changes/:id/cancel (operator) and POST /vendor/products/:id/cancel (vendor withdrawing their own edit). Emits product-change.canceled with { id }.
Usage
Input
Id of the product change to cancel. Must exist and be in
pending status.Actor id recorded as the canceler on the change.
Arbitrary data forwarded to the
productChangeCanceled hook.Result
Returns nothing; the change status is updated in place.
Hooks
Runs first with
{ input } — use it to block cancellation.Runs after cancellation with
{ id, additional_data }.