WooCommerce PDF Invoices & Packing Slips - Version 2.6.1

Version Description

  • Fix: Load custom documents once rather than on every document request
  • Tweak: execute wpo_wcpdf_init_document action in invoice too
  • Tested up to WooCommerce 4.5
Download this release

Release Info

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

Code changes from version 2.6.0 to 2.6.1

includes/class-wcpdf-documents.php CHANGED
@@ -57,6 +57,8 @@ class Documents {
57
  $this->documents['\WPO\WC\PDF_Invoices\Documents\Invoice'] = include( 'documents/class-wcpdf-invoice.php' );
58
  $this->documents['\WPO\WC\PDF_Invoices\Documents\Packing_Slip'] = include( 'documents/class-wcpdf-packing-slip.php' );
59
 
 
 
60
  }
61
 
62
  /**
@@ -68,8 +70,6 @@ class Documents {
68
  if ( empty($this->documents) ) {
69
  $this->init();
70
  }
71
- // Allow plugins to add their own documents
72
- $this->documents = apply_filters( 'wpo_wcpdf_document_classes', $this->documents );
73
 
74
  if ( $filter == 'enabled' ) {
75
  $documents = array();
57
  $this->documents['\WPO\WC\PDF_Invoices\Documents\Invoice'] = include( 'documents/class-wcpdf-invoice.php' );
58
  $this->documents['\WPO\WC\PDF_Invoices\Documents\Packing_Slip'] = include( 'documents/class-wcpdf-packing-slip.php' );
59
 
60
+ // Allow plugins to add their own documents
61
+ $this->documents = apply_filters( 'wpo_wcpdf_document_classes', $this->documents );
62
  }
63
 
64
  /**
70
  if ( empty($this->documents) ) {
71
  $this->init();
72
  }
 
 
73
 
74
  if ( $filter == 'enabled' ) {
75
  $documents = array();
includes/documents/class-wcpdf-invoice.php CHANGED
@@ -72,6 +72,7 @@ class Invoice extends Order_Document_Methods {
72
  }
73
 
74
  $this->init_number();
 
75
  }
76
 
77
  public function exists() {
72
  }
73
 
74
  $this->init_number();
75
+ do_action( 'wpo_wcpdf_init_document', $this );
76
  }
77
 
78
  public function exists() {
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.5
7
  Requires PHP: 5.3
8
- Stable tag: 2.6.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -102,6 +102,11 @@ There's a setting on the Status tab of the settings page that allows you to togg
102
 
103
  == Changelog ==
104
 
 
 
 
 
 
105
  = 2.6.0 =
106
  * Feature: More advanced address visibility options
107
  * Fix: Deprecation notice in WooCommerce 4.4
5
  Requires at least: 3.5
6
  Tested up to: 5.5
7
  Requires PHP: 5.3
8
+ Stable tag: 2.6.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.6.1 =
106
+ * Fix: Load custom documents once rather than on every document request
107
+ * Tweak: execute wpo_wcpdf_init_document action in invoice too
108
+ * Tested up to WooCommerce 4.5
109
+
110
  = 2.6.0 =
111
  * Feature: More advanced address visibility options
112
  * Fix: Deprecation notice in WooCommerce 4.4
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.6.0
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.4.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.6.0';
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.6.1
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.5.0
14
  */
15
 
16
  if ( ! defined( 'ABSPATH' ) ) {
21
 
22
  class WPO_WCPDF {
23
 
24
+ public $version = '2.6.1';
25
  public $plugin_basename;
26
  public $legacy_mode;
27