Sha256: c4fab33993b8b1be13a1023e5da07b1c9927f606efe4b09d6a087d2148afdb3e
Contents?: true
Size: 658 Bytes
Versions: 10
Compression:
Stored size: 658 Bytes
Contents
# frozen_string_literal: true module SolidusBolt module SpreeCheckoutController module AddAddressesToBolt def finalize_order if session[:bolt_access_token] && current_order.payments.last&.source_type == "SolidusBolt::PaymentSource" spree_current_user.addresses.each do |address| SolidusBolt::AddAddressJob.perform_later( order: current_order, access_token: SolidusBolt::Users::RefreshAccessTokenService.call(session: session), address: address ) end end super end Spree::CheckoutController.prepend self end end end
Version data entries
10 entries across 10 versions & 1 rubygems