From 667b49b7f161a2fdffa3e98245d90df794094a7f Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 26 Jun 2025 14:19:39 +1000 Subject: [PATCH] Show hub address for pickup only when feature enabled --- app/views/checkout/_summary.html.haml | 2 +- lib/open_food_network/feature_toggle.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/views/checkout/_summary.html.haml b/app/views/checkout/_summary.html.haml index 6e4d98d2b0..a4cd24addc 100644 --- a/app/views/checkout/_summary.html.haml +++ b/app/views/checkout/_summary.html.haml @@ -11,7 +11,7 @@ = @order.shipping_method.name %em.fees= payment_or_shipping_price(@order.shipping_method, @order) .two-columns - = render "delivery_details" + = render "delivery_details" if @order.shipping_method.delivery? || feature?(:hub_address) - if @order.shipping_method.description.present? %div .summary-subtitle diff --git a/lib/open_food_network/feature_toggle.rb b/lib/open_food_network/feature_toggle.rb index 604f949084..a373917ea3 100644 --- a/lib/open_food_network/feature_toggle.rb +++ b/lib/open_food_network/feature_toggle.rb @@ -67,6 +67,9 @@ module OpenFoodNetwork "inventory" => <<~DESC, Enable the inventory. DESC + "hub_address" => <<~DESC, + Show the hub's address as shipping address on pickup orders. + DESC }.merge(conditional_features).freeze; # Features you would like to be enabled to start with.