Sha256: ed567b56591d60a4e82e617ad00b004489fae060565798ab0d29a04ca26b637d
Contents?: true
Size: 677 Bytes
Versions: 4
Compression:
Stored size: 677 Bytes
Contents
# Once an order is finalized its subscriptions line items should be converted # into active subscritptions. This hooks into Spree::Order#finalize! and # passes all subscription_line_items present on the order to the Subscription # generator which will build and persist the subscriptions module Spree module Orders module FinalizeCreatesSubscriptions def finalize! SolidusSubscriptions::SubscriptionGenerator.group(subscription_line_items).each do |line_items| SolidusSubscriptions::SubscriptionGenerator.activate(line_items) end super end end end end Spree::Order.prepend Spree::Orders::FinalizeCreatesSubscriptions
Version data entries
4 entries across 4 versions & 1 rubygems