fix(emails): correct invoice_issued mail template key to invoiceIssued - #818
Merged
Conversation
@ecomplus/transactional-mails exports the invoice template as `invoiceIssued` (camelCase, like all other status templates), but get-mail-templ.ts returns `templ: 'invoice_issued'`. The lookup `transactionalMails[templateName]` then returns undefined and every invoice_issued email fails with "TypeError: render is not a function". Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
leomp12
approved these changes
Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Bug
Every
invoice_issuedtransactional email fails with:@ecomplus/transactional-mailsexports the invoice template asinvoiceIssued(camelCase, like all the other status templates:inProduction,readyForShipping, ...), butget-mail-templ.tsreturnstempl: 'invoice_issued'for that status.getMailRenderthen resolvestransactionalMails['invoice_issued']→undefined, and the render call throws. The event is retried a few times and finally dropped by age, so the customer/merchant never get the invoice email.templis typed as plainstring, which is why the wrong key type-checked.Fix
One line:
templ: 'invoice_issued'→templ: 'invoiceIssued'.Observed in production on store 401207 (mundoquadri, 2026-08-24, order #6107): all other email types reach the SMTP provider normally, only
invoice_issuedthrows.🤖 Generated with Claude Code