mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
Fix payment decorator bug
Payment line items must come from the order, payment does not have inventory_units
This commit is contained in:
@@ -32,11 +32,7 @@ module Spree
|
||||
|
||||
# This is called by the calculator of a payment method
|
||||
def line_items
|
||||
if order.complete? && Spree::Config[:track_inventory_levels]
|
||||
order.line_items.select { |li| inventory_units.pluck(:variant_id).include?(li.variant_id) }
|
||||
else
|
||||
order.line_items
|
||||
end
|
||||
order.line_items
|
||||
end
|
||||
|
||||
# Pin payments lacks void and credit methods, but it does have refund
|
||||
|
||||
Reference in New Issue
Block a user