<commit_before>module SpreeMultiVendor::Spree::Stock::PackageDecorator
  def shipping_methods
    vendor = stock_location.vendor
    
    if vendor && Spree::ShippingMethod.method_defined?(:vendor)
      vendor.shipping_methods.to_a
    else
      shipping_categories.map(&:shipping_methods).reduce(:&).to_a
    end
  end
end

Spree::Stock::Package.prepend SpreeMultiVendor::Spree::Stock::PackageDecorator<commit_msg>Additional check is vendor method defined<commit_after>module SpreeMultiVendor::Spree::Stock::PackageDecorator
  def shipping_methods
    vendor = Spree::StockLocation.method_defined?(:vendor) ? stock_location.vendor : nil

    # return only shipping methods for this Vendor
    if vendor && Spree::ShippingMethod.method_defined?(:vendor)
      vendor.shipping_methods.to_a
    else
      shipping_categories.map(&:shipping_methods).reduce(:&).to_a
    end
  end
end

Spree::Stock::Package.prepend SpreeMultiVendor::Spree::Stock::PackageDecorator
{'fraction_non_alphanumeric': 0.10176531671858775, 'fraction_numerical': 0.0, 'mean_word_length': 5.557823129251701, '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': '3749249', 'n_tokens_mistral': 300, 'n_tokens_neox': 292, 'n_words': 47}