File tree 3 files changed +10
-2
lines changed
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ def validate_return_items_belong_to_same_order
162
162
end
163
163
164
164
def send_reimbursement_email
165
- Spree ::ReimbursementMailer . reimbursement_email ( id ) . deliver_later
165
+ Spree ::Config . reimbursement_mailer_class . reimbursement_email ( id ) . deliver_later
166
166
end
167
167
168
168
# If there are multiple different reimbursement types for a single
Original file line number Diff line number Diff line change @@ -325,6 +325,14 @@ def default_pricing_options
325
325
# signature as Spree::PromotionCodeBatchMailer.promotion_code_batch_finished.
326
326
class_name_attribute :promotion_code_batch_mailer_class , default : 'Spree::PromotionCodeBatchMailer'
327
327
328
+ # Allows providing your own Mailer for reimbursement mailer.
329
+ #
330
+ # @!attribute [rw] reimbursement_mailer_class
331
+ # @return [ActionMailer::Base] an object that responds to "reimbursement_email"
332
+ # (e.g. an ActionMailer with a "reimbursement_email" method) with the same
333
+ # signature as Spree::ReimbursementMailer.reimbursement_email.
334
+ class_name_attribute :reimbursement_mailer_class , default : 'Spree::ReimbursementMailer'
335
+
328
336
# Allows providing your own Mailer for shipped cartons.
329
337
#
330
338
# @!attribute [rw] carton_shipped_email_class
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ class ReimbursementPreview < ActionMailer::Preview
6
6
def reimbursement
7
7
reimbursement = Reimbursement . last
8
8
raise "Your database needs at least one Reimbursement to render this preview" unless reimbursement
9
- ReimbursementMailer . reimbursement_email ( reimbursement )
9
+ Spree :: Config . reimbursement_mailer_class . reimbursement_email ( reimbursement )
10
10
end
11
11
end
12
12
end
You can’t perform that action at this time.
0 commit comments