Преглед на файлове

Merge pull request #474 from Shopify/update-prod-end

Use new products endpoint only when no params are passed
Ignacio Chiazzo Cardarello преди 6 години
родител
ревизия
a4639d9584
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      lib/shopify_api/resources/smart_collection.rb

+ 1 - 1
lib/shopify_api/resources/smart_collection.rb

@@ -4,7 +4,7 @@ module ShopifyAPI
     include Metafields
 
     def products(options = {})
-      if options.key?(:only_sorted)
+      if options.present?
         Product.find(:all, from: "/admin/smart_collections/#{id}/products.json", params: options)
       else
         Product.find(:all, params: { collection_id: id })