Hi Bas, thank you for your work. I needed this function too, because I use “WooCommerce Payment Fees Lite” to add fees on COD payment type. But after the update I get this error and I’m not able anymore to create invoices.
Warning: file_get_contents(BEWPI_TEMPLATES_DIRmicro/style.css): failed to open stream: No such file or directory in /web/htdocs/shop.fabulousapparel.it/home/wp-content/plugins/woocommerce-pdf-invoices/includes/classes/bewpi-invoice.php on line 375
Warning: require_once(BEWPI_TEMPLATES_DIRmicro/header.php): failed to open stream: No such file or directory in /web/htdocs/shop.fabulousapparel.it/home/wp-content/plugins/woocommerce-pdf-invoices/includes/classes/bewpi-invoice.php on line 351
Fatal error: require_once(): Failed opening required 'BEWPI_TEMPLATES_DIRmicro/header.php' (include_path='.:/php5.5/lib/php/') in /web/htdocs/shop.fabulousapparel.it/home/wp-content/plugins/woocommerce-pdf-invoices/includes/classes/bewpi-invoice.php on line 351