<commit_before>module Spree
  Order.class_eval do
    has_many :subscription

    def subscription_products
      products.subscribable
    end

    def check_subscriptions!
      line_items.map do |li|
        if li.product.subscription?
          sp = li.product
          subscription = find_subscription(user, sp)

          if subscription && !subscription.recurring
            subscription.update(limit: subscription.limit += sp.limit)
          else
            Subscription.create(
              user: user,
              subscription_product: sp,
              address: ship_address,
              limit: sp.limit,
              credit_card:  payment.source,<commit_msg>Use line item ship address to create the subscriptions<commit_after>module Spree
  Order.class_eval do
    has_many :subscription

    def subscription_products
      products.subscribable
    end

    def check_subscriptions!
      line_items.map do |li|
        if li.product.subscription?
          sp = li.product
          subscription = find_subscription(user, sp)

          if subscription && !subscription.recurring
            subscription.update(limit: subscription.limit += sp.limit)
          else
            Subscription.create(
              user: user,
              subscription_product: sp,
              address: li.ship_address,
              limit: sp.limit,
              credit_card:  payment.source,
{'fraction_non_alphanumeric': 0.06481481481481481, 'fraction_numerical': 0.0, 'mean_word_length': 1.9641350210970465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4114796', 'n_tokens_mistral': 352, 'n_tokens_neox': 359, 'n_words': 87}