Sha256: cb286ab0ca220e03a9f68db86a7a1a34ee439e8c3d84cf691c860a199ad235e1
Contents?: true
Size: 526 Bytes
Versions: 5
Compression:
Stored size: 526 Bytes
Contents
# frozen_string_literal: true module SolidusPromotions # Clears promotions from an emptied order class OrderPromotionSubscriber include Omnes::Subscriber handle :order_emptied, with: :clear_order_promotions, id: :solidus_promotions_order_promotion_clear_order_promotions # Clears all promotions from the order # # @param event [Omnes::UnstructuredEvent] def clear_order_promotions(event) order = event[:order] order.solidus_order_promotions.destroy_all end end end
Version data entries
5 entries across 5 versions & 1 rubygems