diff --git a/assets/js/admin-script.js b/assets/js/admin-script.js
index d61c6734..426f988d 100644
--- a/assets/js/admin-script.js
+++ b/assets/js/admin-script.js
@@ -478,7 +478,7 @@ jQuery( function( $ ) {
default: // for other XML extensions
let xml = response.data.preview_data;
let xml_escaped = xml.replace( /&/g,'&' ).replace( //g,'>' ).replace( / /g, ' ' ).replace( /\n/g,'
' );
- $preview.html( '
'+xml_escaped+'
' );
+ $preview.html( '' + xml_escaped + '
' );
break;
}
}
diff --git a/includes/Documents/OrderDocument.php b/includes/Documents/OrderDocument.php
index 073be303..378823bc 100644
--- a/includes/Documents/OrderDocument.php
+++ b/includes/Documents/OrderDocument.php
@@ -1395,7 +1395,7 @@ public function output_html() {
*
* @param string $output_format
* @param XMLDocument $xml_document
- * @return void
+ * @return mixed
*/
public function preview_xml( string $output_format, XMLDocument $xml_document ) {
// get last settings
@@ -1409,9 +1409,9 @@ public function preview_xml( string $output_format, XMLDocument $xml_document )
*
* @param XMLDocument $xml_document
* @param boolean $contents_only
- * @return void
+ * @return mixed
*/
- public function output_xml( XMLDocument $xml_document, $contents_only = false ) {
+ public function output_xml( XMLDocument $xml_document, bool $contents_only = false ) {
$xml_maker = wcpdf_get_xml_maker();
$xml_document->set_order( $this->order );
diff --git a/includes/Main.php b/includes/Main.php
index ff718c9d..3cc3ccb4 100644
--- a/includes/Main.php
+++ b/includes/Main.php
@@ -542,7 +542,7 @@ public function generate_document_ajax() {
$document->output_pdf( $output_mode );
break;
default: // custom output
- do_action( 'wpo_wcpdf_document_output', $document, $output_format );
+ do_action( 'wpo_wcpdf_document_custom_output', $document, $output_format );
break;
}
} else {
diff --git a/woocommerce-pdf-invoices-packingslips.php b/woocommerce-pdf-invoices-packingslips.php
index d39f0084..f58a21c3 100644
--- a/woocommerce-pdf-invoices-packingslips.php
+++ b/woocommerce-pdf-invoices-packingslips.php
@@ -144,6 +144,7 @@ public function includes() {
// plugin functions
include_once $this->plugin_path() . '/wpo-ips-functions.php';
+ include_once $this->plugin_path() . '/wpo-ips-deprecated-functions.php';
// Third party compatibility
$this->third_party_plugins = \WPO\IPS\Compatibility\ThirdPartyPlugins::instance();
diff --git a/wpo-ips-deprecated-functions.php b/wpo-ips-deprecated-functions.php
new file mode 100644
index 00000000..7db776b2
--- /dev/null
+++ b/wpo-ips-deprecated-functions.php
@@ -0,0 +1,16 @@
+