WooCommerce PDF Invoices & Packing Slips - Version 2.4.7

Version Description

  • Fix: missing order number in filename when invoice number not enabled
  • Dev: Added action hook for document save method (wpo_wcpdf_save_document)
  • Dev: Added action hook for printing custom data in PDF invoice data panel (wpo_wcpdf_meta_box_after_document_data)
  • Tested up to WooCommerce 4.0 & WP 5.4
Download this release

Release Info

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

Code changes from version 2.4.6 to 2.4.7

includes/class-wcpdf-admin.php CHANGED
@@ -392,6 +392,9 @@ class Admin {
392
  </p>
393
  </p>
394
  </div>
 
 
 
395
  <?php else : ?>
396
  <span class="wpo-wcpdf-set-date-number button"><?php _e( 'Set invoice number & date', 'woocommerce-pdf-invoices-packing-slips' ) ?></span>
397
  <?php endif; ?>
392
  </p>
393
  </p>
394
  </div>
395
+
396
+ <?php do_action( 'wpo_wcpdf_meta_box_after_document_data', $invoice, $order ); ?>
397
+
398
  <?php else : ?>
399
  <span class="wpo-wcpdf-set-date-number button"><?php _e( 'Set invoice number & date', 'woocommerce-pdf-invoices-packing-slips' ) ?></span>
400
  <?php endif; ?>
includes/documents/abstract-wcpdf-order-document.php CHANGED
@@ -270,6 +270,8 @@ abstract class Order_Document {
270
  }
271
  }
272
  }
 
 
273
  }
274
 
275
  public function delete( $order = null ) {
@@ -289,7 +291,7 @@ abstract class Order_Document {
289
  WCX_Order::delete_meta_data( $order, "_wcpdf_{$this->slug}_{$data_key}" );
290
  }
291
 
292
- do_action( 'wpo_wcpdf_delete_document', $this );
293
  }
294
 
295
  public function is_allowed() {
270
  }
271
  }
272
  }
273
+
274
+ do_action( 'wpo_wcpdf_save_document', $this, $order );
275
  }
276
 
277
  public function delete( $order = null ) {
291
  WCX_Order::delete_meta_data( $order, "_wcpdf_{$this->slug}_{$data_key}" );
292
  }
293
 
294
+ do_action( 'wpo_wcpdf_delete_document', $this, $order );
295
  }
296
 
297
  public function is_allowed() {
includes/documents/class-wcpdf-invoice.php CHANGED
@@ -129,7 +129,7 @@ class Invoice extends Order_Document_Methods {
129
  $name = _n( 'invoice', 'invoices', $order_count, 'woocommerce-pdf-invoices-packing-slips' );
130
 
131
  if ( $order_count == 1 ) {
132
- if ( isset( $this->settings['display_number'] ) ) {
133
  $suffix = (string) $this->get_number();
134
  } else {
135
  if ( empty( $this->order ) ) {
129
  $name = _n( 'invoice', 'invoices', $order_count, 'woocommerce-pdf-invoices-packing-slips' );
130
 
131
  if ( $order_count == 1 ) {
132
+ if ( isset( $this->settings['display_number'] ) && $this->settings['display_number'] == 'invoice_number' ) {
133
  $suffix = (string) $this->get_number();
134
  } else {
135
  if ( empty( $this->order ) ) {
readme.txt CHANGED
@@ -3,9 +3,9 @@ Contributors: pomegranate
3
  Donate link: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
4
  Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice, packing slip, export, email, bulk, automatic
5
  Requires at least: 3.5
6
- Tested up to: 5.3
7
  Requires PHP: 5.3
8
- Stable tag: 2.4.6
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,12 @@ There's a setting on the Status tab of the settings page that allows you to togg
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
 
105
  = 2.4.6 =
106
  * Fix: Locale determination for admins on their own my account page
107
  * Fix: Action buttons icon alignment in WP5.3+
3
  Donate link: https://wpovernight.com/downloads/woocommerce-pdf-invoices-packing-slips-bundle/
4
  Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice, packing slip, export, email, bulk, automatic
5
  Requires at least: 3.5
6
+ Tested up to: 5.4
7
  Requires PHP: 5.3
8
+ Stable tag: 2.4.7
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.7 =
106
+ * Fix: missing order number in filename when invoice number not enabled
107
+ * Dev: Added action hook for document save method (`wpo_wcpdf_save_document`)
108
+ * Dev: Added action hook for printing custom data in PDF invoice data panel (`wpo_wcpdf_meta_box_after_document_data`)
109
+ * Tested up to WooCommerce 4.0 & WP 5.4
110
+
111
  = 2.4.6 =
112
  * Fix: Locale determination for admins on their own my account page
113
  * Fix: Action buttons icon alignment in WP5.3+
woocommerce-pdf-invoices-packingslips.php CHANGED
@@ -3,14 +3,14 @@
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.6
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
10
  * License URI: http://www.opensource.org/licenses/gpl-license.php
11
  * Text Domain: woocommerce-pdf-invoices-packing-slips
12
  * WC requires at least: 2.2.0
13
- * WC tested up to: 3.9.0
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
@@ -21,7 +21,7 @@ if ( !class_exists( 'WPO_WCPDF' ) ) :
21
 
22
  class WPO_WCPDF {
23
 
24
- public $version = '2.4.6';
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.7
7
  * Author: Ewout Fernhout
8
  * Author URI: http://www.wpovernight.com
9
  * License: GPLv2 or later
10
  * License URI: http://www.opensource.org/licenses/gpl-license.php
11
  * Text Domain: woocommerce-pdf-invoices-packing-slips
12
  * WC requires at least: 2.2.0
13
+ * WC tested up to: 4.0.0
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '2.4.7';
25
  public $plugin_basename;
26
  public $legacy_mode;
27