WooCommerce PDF Invoices & Packing Slips - Version 2.4.2

Version Description

  • Fix: 'No' option in new date & number visibility setting
  • Fix: Resetting headers caused unintended caching of PDF files on some hosts
Download this release

Release Info

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

Code changes from version 2.4.1 to 2.4.2

includes/documents/abstract-wcpdf-order-document.php CHANGED
@@ -151,6 +151,15 @@ abstract class Order_Document {
151
  WCX_Order::update_meta_data( $this->order, "_wcpdf_{$this->slug}_settings", $settings );
152
  }
153
 
 
 
 
 
 
 
 
 
 
154
  return $settings;
155
  }
156
 
151
  WCX_Order::update_meta_data( $this->order, "_wcpdf_{$this->slug}_settings", $settings );
152
  }
153
 
154
+ // display date & display number were checkbox settings but now a select setting that could be set but empty - should behave as 'unchecked'
155
+ if ( empty( $settings['display_date'] ) ) {
156
+ unset( $settings['display_date'] );
157
+ }
158
+
159
+ if ( empty( $settings['display_number'] ) ) {
160
+ unset( $settings['display_number'] );
161
+ }
162
+
163
  return $settings;
164
  }
165
 
includes/wcpdf-functions.php CHANGED
@@ -127,9 +127,6 @@ function wcpdf_get_pdf_maker( $html, $settings = array() ) {
127
  }
128
 
129
  function wcpdf_pdf_headers( $filename, $mode = 'inline', $pdf = null ) {
130
- if ( ! headers_sent() ) {
131
- header_remove();
132
- }
133
  switch ($mode) {
134
  case 'download':
135
  header('Content-Description: File Transfer');
127
  }
128
 
129
  function wcpdf_pdf_headers( $filename, $mode = 'inline', $pdf = null ) {
 
 
 
130
  switch ($mode) {
131
  case 'download':
132
  header('Content-Description: File Transfer');
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.3
7
  Requires PHP: 5.3
8
- Stable tag: 2.4.1
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,10 @@ There's a setting on the Status tab of the settings page that allows you to togg
102
 
103
  == Changelog ==
104
 
 
 
 
 
105
  = 2.4.1 =
106
  * Fix: Creating invoices for draft orders would crash plugin
107
  * Tweak: Include time in default invoice date
5
  Requires at least: 3.5
6
  Tested up to: 5.3
7
  Requires PHP: 5.3
8
+ Stable tag: 2.4.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
102
 
103
  == Changelog ==
104
 
105
+ = 2.4.2 =
106
+ * Fix: 'No' option in new date & number visibility setting
107
+ * Fix: Resetting headers caused unintended caching of PDF files on some hosts
108
+
109
  = 2.4.1 =
110
  * Fix: Creating invoices for draft orders would crash plugin
111
  * Tweak: Include time in default invoice date
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.4.1
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.4.1';
25
  public $plugin_basename;
26
  public $legacy_mode;
27
 
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.4.2
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.4.2';
25
  public $plugin_basename;
26
  public $legacy_mode;
27