Sha256: 26f0449e7cb2761998c4acef4c6dc6f513b56334b121e557cf843daadac6c005
Contents?: true
Size: 526 Bytes
Versions: 57
Compression:
Stored size: 526 Bytes
Contents
# This class should be refactored module Spree class CompareLineItems prepend Spree::ServiceModule:: Base def call(order:, line_item:, options: {}, comparison_hooks: Rails.application.config.spree.line_item_comparison_hooks) legacy_part = comparison_hooks.all? do |hook| order.send(hook, line_item, options) end success(legacy_part && compare(line_item, options)) end private # write your custom logic here def compare(_line_item, _options) true end end end
Version data entries
57 entries across 57 versions & 1 rubygems