WooCommerce PDF Invoices & Packing Slips - Version 2.8.1

Version Description

  • Fix: Images and fonts loading from custom locations for uploads and temporary folders
Download this release

Release Info

Developer pomegranate
Plugin Icon 128x128 WooCommerce PDF Invoices & Packing Slips
Version 2.8.1
Comparing to
See all releases

Code changes from version 2.8.0 to 2.8.1

includes/class-wcpdf-pdf-maker.php CHANGED
@@ -37,7 +37,7 @@ class PDF_Maker {
37
  'tempDir' => WPO_WCPDF()->main->get_tmp_path('dompdf'),
38
  'fontDir' => WPO_WCPDF()->main->get_tmp_path('fonts'),
39
  'fontCache' => WPO_WCPDF()->main->get_tmp_path('fonts'),
40
- 'chroot' => array( WP_CONTENT_DIR ),
41
  'logOutputFile' => WPO_WCPDF()->main->get_tmp_path('dompdf') . "/log.htm",
42
  'defaultFont' => 'dejavu sans',
43
  'isRemoteEnabled' => true,
@@ -56,6 +56,19 @@ class PDF_Maker {
56
 
57
  return $dompdf->output();
58
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
59
  }
60
 
61
  endif; // class_exists
37
  'tempDir' => WPO_WCPDF()->main->get_tmp_path('dompdf'),
38
  'fontDir' => WPO_WCPDF()->main->get_tmp_path('fonts'),
39
  'fontCache' => WPO_WCPDF()->main->get_tmp_path('fonts'),
40
+ 'chroot' => $this->get_chroot_paths(),
41
  'logOutputFile' => WPO_WCPDF()->main->get_tmp_path('dompdf') . "/log.htm",
42
  'defaultFont' => 'dejavu sans',
43
  'isRemoteEnabled' => true,
56
 
57
  return $dompdf->output();
58
  }
59
+
60
+ private function get_chroot_paths() {
61
+ $chroot = array( WP_CONTENT_DIR ); // default
62
+
63
+ if( $wp_upload_base = WPO_WCPDF()->main->get_wp_upload_base() ) {
64
+ $chroot[] = $wp_upload_base;
65
+ }
66
+ if( $tmp_base = WPO_WCPDF()->main->get_tmp_base() ) {
67
+ $chroot[] = $tmp_base;
68
+ }
69
+
70
+ return apply_filters( 'wpo_wcpdf_dompdf_chroot', $chroot );
71
+ }
72
  }
73
 
74
  endif; // class_exists
includes/wcpdf-functions.php CHANGED
@@ -144,6 +144,7 @@ function wcpdf_pdf_headers( $filename, $mode = 'inline', $pdf = null ) {
144
  header('Content-Disposition: inline; filename="'.$filename.'"');
145
  break;
146
  }
 
147
  }
148
 
149
  /**
144
  header('Content-Disposition: inline; filename="'.$filename.'"');
145
  break;
146
  }
147
+ do_action( 'wpo_wcpdf_headers', $filename, $mode, $pdf );
148
  }
149
 
150
  /**
readme.txt CHANGED
@@ -5,7 +5,7 @@ Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice,
5
  Requires at least: 3.5
6
  Tested up to: 5.6
7
  Requires PHP: 7.1
8
- Stable tag: 2.8.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,9 @@ There's a setting on the Status tab of the settings page that allows you to togg
102
 
103
  == Changelog ==
104
 
 
 
 
105
  = 2.8.0 =
106
  * Fix: Support for PHP8.0, deprecating support for PHP7.0 or older (separate addon available for backwards compatibility)
107
  * Fix: Setup wizard crash when 3rd party plugins/themes check screen object
5
  Requires at least: 3.5
6
  Tested up to: 5.6
7
  Requires PHP: 7.1
8
+ Stable tag: 2.8.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
102
 
103
  == Changelog ==
104
 
105
+ = 2.8.1 =
106
+ * Fix: Images and fonts loading from custom locations for uploads and temporary folders
107
+
108
  = 2.8.0 =
109
  * Fix: Support for PHP8.0, deprecating support for PHP7.0 or older (separate addon available for backwards compatibility)
110
  * Fix: Setup wizard crash when 3rd party plugins/themes check screen object
woocommerce-pdf-invoices-packingslips.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: http://www.wpovernight.com
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
- * Version: 2.8.0
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
@@ -21,7 +21,7 @@ if ( !class_exists( 'WPO_WCPDF' ) ) :
21
 
22
  class WPO_WCPDF {
23
 
24
- public $version = '2.8.0';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;
3
  * Plugin Name: WooCommerce PDF Invoices & Packing Slips
4
  * Plugin URI: http://www.wpovernight.com
5
  * Description: Create, print & email PDF invoices & packing slips for WooCommerce orders.
6
+ * Version: 2.8.1
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '2.8.1';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
  public $legacy_textdomain;