diff options
Diffstat (limited to 'app/decorators/super_good/solidus_taxjar/spree/order_updater/fire_recalculated_event.rb')
-rw-r--r-- | app/decorators/super_good/solidus_taxjar/spree/order_updater/fire_recalculated_event.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/app/decorators/super_good/solidus_taxjar/spree/order_updater/fire_recalculated_event.rb b/app/decorators/super_good/solidus_taxjar/spree/order_updater/fire_recalculated_event.rb new file mode 100644 index 0000000..1e169bc --- /dev/null +++ b/app/decorators/super_good/solidus_taxjar/spree/order_updater/fire_recalculated_event.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +module SuperGood + module SolidusTaxjar + module Spree + module OrderUpdater + module FireRecalculatedEvent + def persist_totals + ::Spree::Event.fire 'order_recalculated', order: order + super + end + + ::Spree::OrderUpdater.prepend(self) if ::Spree.solidus_gem_version < Gem::Version.new('2.11.0') + end + end + end + end +end |