Sha256: 65136c70c9d0e6cf675a25b35b7eb2440eaf64e8d406b73f9574d942ae38962d
Contents?: true
Size: 605 Bytes
Versions: 6
Compression:
Stored size: 605 Bytes
Contents
Spree::Order.class_eval do # Make sure the order confirmation is delivered when the order has been paid for. def finalize! # lock all adjustments (coupon promotions, etc.) all_adjustments.each(&:close) # update payment and shipment(s) states, and save updater.update_payment_state shipments.each do |shipment| shipment.update!(self) shipment.finalize! if paid? end updater.update_shipment_state save! updater.run_hooks touch :completed_at deliver_order_confirmation_email unless confirmation_delivered? or !paid? consider_risk end end
Version data entries
6 entries across 6 versions & 1 rubygems