diff --git a/app/serializers/api/product_serializer.rb b/app/serializers/api/product_serializer.rb index d97f9967b2..f3ae97b56e 100644 --- a/app/serializers/api/product_serializer.rb +++ b/app/serializers/api/product_serializer.rb @@ -3,7 +3,7 @@ require "open_food_network/scope_variant_to_hub" class Api::ProductSerializer < ActiveModel::Serializer attributes :id, :name, :permalink, :meta_keywords attributes :group_buy, :notes, :description, :description_html - attributes :properties_with_values, :price + attributes :properties_with_values has_many :variants, serializer: Api::VariantSerializer has_one :master, serializer: Api::VariantSerializer @@ -36,14 +36,6 @@ class Api::ProductSerializer < ActiveModel::Serializer options[:master_variants][object.id].andand.first end - def price - if options[:enterprise_fee_calculator] - object.master.price + options[:enterprise_fee_calculator].indexed_fees_for(object.master) - else - object.master.price_with_fees(options[:current_distributor], options[:current_order_cycle]) - end - end - private def sanitizer