core/app/models/spree/order.rb
def ensure_line_item_variants_are_not_deleted
      if line_items.any? { |li| li.variant.discarded? }
        errors.add(:base, I18n.t('spree.deleted_variants_present'))
        restart_checkout_flow
        false
      else
        true
      end
    end
##
# Check to see if any line item variants are soft, deleted.
# If so add error and restart checkout.
Check to see if any line item variants are soft, deleted.
If so add error and restart checkout.
Check to see if any line item variants are soft deleted . If so add error and restart checkout .
def ensure_line_item_variants_are_not_deleted
      if line_items.any? { |li| li.variant.discarded? }
        errors.add(:base, I18n.t('spree.deleted_variants_present'))
        restart_checkout_flow
        false
      else
        true
      end
    end
def ensure_line_item_variants_are_not_deleted if line_items . any? { | li | li . variant . discarded? } errors . add ( :base , I18n . t ( 'spree.deleted_variants_present' ) ) restart_checkout_flow false else true end end
Check to see if any line item variants are soft, deleted.
Check to see if any line item variants are soft deleted .