$custom_fields is not available in invoice templates and email template

Then please upgrade to 1.5.2 or wait a few days until 1.5.3 get’s released. $custom_fields is available for all PDF files and custom fields are also avilable in email templates in all of my testing setups.