diff --git a/core/lib/spree/mailer_previews/carton_preview.rb b/core/lib/spree/mailer_previews/carton_preview.rb index 41c09f75477..a1c4653a263 100644 --- a/core/lib/spree/mailer_previews/carton_preview.rb +++ b/core/lib/spree/mailer_previews/carton_preview.rb @@ -5,7 +5,8 @@ class MailerPreviews class CartonPreview < ActionMailer::Preview def shipped carton = Carton.joins(:orders).last - raise "Your database needs at one shipped order with a carton to render this preview" unless carton + raise "Your database needs at least one shipped order with a carton to render this preview" unless carton + Spree::Config.carton_shipped_email_class.shipped_email(order: carton.orders.first, carton: carton) end end