For anyone wondering, this was the solution:
This issue is happening because in the last release we deleted legacy code that we were maintaining for years. Currently, the global variable $wpo_wcpdf no longer exists, that is why the error is generated.
However, you can follow these steps to fix this issue:
- Replace the whole code of the
html-document-wrapper.php
file with the current one you will find here.
- Open the
invoice.php
file, and do the following:
- Replace the first like with this one:
<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>
- Replace every concurrence of
$wpo_wcpdf
with $this
- Replace every concurrence of
'wpo_wcpdf'
with 'woocommerce-pdf-invoices-packing-slips'
: This is the text domain which is needed in order for translations to work.
- If need it, repeat the steps of the 2nd point for the packing slip too.