forked from CGM_Public/pretix_original
Attach invoice to order approval email
This commit is contained in:
@@ -237,7 +237,8 @@ def approve_order(order, user=None, send_mail: bool=True, auth=None):
|
|||||||
try:
|
try:
|
||||||
order.send_mail(
|
order.send_mail(
|
||||||
email_subject, email_template, email_context,
|
email_subject, email_template, email_context,
|
||||||
'pretix.event.order.email.order_approved', user
|
'pretix.event.order.email.order_approved', user,
|
||||||
|
invoices=[invoice] if invoice and order.event.settings.invoice_email_attachment else []
|
||||||
)
|
)
|
||||||
except SendMailException:
|
except SendMailException:
|
||||||
logger.exception('Order approved email could not be sent')
|
logger.exception('Order approved email could not be sent')
|
||||||
|
|||||||
Reference in New Issue
Block a user