diff --git a/lib/berrypod_web/components/shop_components/settings_editor.ex b/lib/berrypod_web/components/shop_components/settings_editor.ex index e8a7f01..6b67b2a 100644 --- a/lib/berrypod_web/components/shop_components/settings_editor.ex +++ b/lib/berrypod_web/components/shop_components/settings_editor.ex @@ -265,10 +265,17 @@ defmodule BerrypodWeb.ShopComponents.SettingsEditor do end defp provider_label(product) do - case product.provider_type do + # provider_type is on the association, not the product itself + provider_type = + case product do + %{provider_connection: %{provider_type: type}} when is_binary(type) -> type + _ -> nil + end + + case provider_type do "printify" -> "Printify" "printful" -> "Printful" - _ -> "Unknown" + _ -> "Print provider" end end