Metadata in mails

It is now possible to access metadata in mail templates. E.g. if customer metadata contains shoe_size key and value it can be accessed in the template as:

{{customer.metadata.shoe_size}}

Metadata is available as

customer.metadata
subscription.metadata
plan.metadata
invoice.metadata

and add-on metadata as a parameter in the list of subscription add-ons subscription.add_ons[].metadata. Example iterating through subscription add-ons:

{{#subscription.add_ons}}
Name: {{name}}<br/>
License plate: {{metadata.plate}}<br/>
{{/subscription.add_ons}}

For details on Mustache templating see: https://mustache.github.io/mustache.5.html