Sha256: ca9962644d5c344e4b693a39935f26c5312397e7974155d09019aca31bc02b54
Contents?: true
Size: 607 Bytes
Versions: 22
Compression:
Stored size: 607 Bytes
Contents
module Spree module Cart class RemoveLineItem prepend Spree::ServiceModule::Base def call(order:, line_item:, options: nil) options ||= {} ActiveRecord::Base.transaction do line_item.destroy! Spree::Dependencies.cart_recalculate_service.constantize.new.call(order: order, line_item: line_item, options: options) end order.reload success(line_item) end end end end
Version data entries
22 entries across 22 versions & 1 rubygems