benmorganio
07/15/2023, 8:56 PMbenmorganio
07/15/2023, 9:08 PM36.0 / 2.0
internally.benmorganio
07/15/2023, 9:11 PMinventory_units.each do |inventory_unit|
Spree::UnitCancel.create!(inventory_unit:).adjust!
end
inventory_units.cancelable.each(&:cancel!)
But the solution was:
inventory_units.each do |inventory_unit|
Spree::UnitCancel.create!(inventory_unit:).adjust!
inventory_unit.cancel!
end
I wonder if we could make Spree::UnitCancel
handle that state change itself.mamhoff
07/17/2023, 9:13 AM