Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Removed deprecated method `default_logo` (#11585)

Damian Legawiecaea50effeda1
diff --git a/emails/app/helpers/spree/mail_helper.rb b/emails/app/helpers/spree/mail_helper.rb
index 641f9d1d9a..d76f200c56 100644
--- a/emails/app/helpers/spree/mail_helper.rb
+++ b/emails/app/helpers/spree/mail_helper.rb
@@ -15,17 +15,7 @@ module Spree
@store_logo ||= current_store&.mailer_logo || current_store&.logo
end
- def default_logo
- ActiveSupport::Deprecation.warn(<<-DEPRECATION, caller)
- `MailHelper#default_logo` is deprecated and will be removed in Spree 5.0.
- Please upload a Store logo instead
- DEPRECATION
-
- image_url('logo/spree_50.png')
- end
-
def logo_path
- return default_logo unless store_logo.attached?
return main_app.cdn_image_url(store_logo.variant(resize_to_limit: [244, 104])) if store_logo.variable?
return main_app.cdn_image_url(store_logo) if store_logo.image?
diff --git a/emails/app/views/spree/shared/_base_mailer_header.html.erb b/emails/app/views/spree/shared/_base_mailer_header.html.erb
index 51ac35daf8..a19a1706aa 100644
--- a/emails/app/views/spree/shared/_base_mailer_header.html.erb
+++ b/emails/app/views/spree/shared/_base_mailer_header.html.erb
@@ -2,7 +2,11 @@
<tr>
<td class="email-masthead">
<%= link_to current_store.url, class: 'template-label' do %>
- <%= image_tag logo_path, class: 'logo', alt: current_store.name, title: current_store.name %>
+ <% if logo_path.present? %>
+ <%= image_tag logo_path, class: 'logo', alt: current_store.name, title: current_store.name %>
+ <% else %>
+ <%= current_store.name %>
+ <% end %>
<% end %>
</td>
</tr>