Troubleshooting Invoice/Estimate Templates
Header Content Injection
Some plugins and themes inject content around all WordPress templates regardless of content, and while I could rant about how this technique is terrible in every instance I'm going to hopefully provide a way to solve it for you.
First, here is an example of what it may look like. In this example a navigation is inserted before the the Sprout Invoices estimate template, which would cause a "headers already sent" in some instances.

Solutions:
- Determine the plugin causing the issue.
- The plugin may have an option to disable the template injection based on post types (i.e. sa_invoice, and sa_estimate).
- Contact the plugin author about not having an option, maybe they have a filter to help.
- Determine the theme causing the issue.
- The theme may have an option to disable the template injection based on post types (i.e. sa_invoice, and sa_estimate).
- Contact the theme author about not having an option, maybe they have a filter to help.
Make sure to contact support, so that we know which plugin or theme is having the incompatibility. We may have a quick filter/action/solution for you so you don't have to wait for the developer.
Known Themes
Bellevue Theme
This theme uses a Roots_Wrapping class to wrap all WP templates. There are filters included but many do not work. The quick solution is to copy the invoice and estimate templates to your theme.
- Copy /views/templates/invoice/invoice.php and /views/templates/estimate/estimate.php to the theme directory.
- Rename them to base-invoice.php and base-estimate.php respectively.
Example: 