Version Description
- Fix: Prevent duplicate invoice numbers for multiple attachment setups
- Fix: Apply email order filter for each email separately
Download this release
Release Info
Developer | pomegranate |
Plugin | WooCommerce PDF Invoices & Packing Slips |
Version | 2.3.4 |
Comparing to | |
See all releases |
Code changes from version 2.3.3 to 2.3.4
- includes/class-wcpdf-main.php +7 -2
- readme.txt +5 -1
- woocommerce-pdf-invoices-packingslips.php +2 -2
includes/class-wcpdf-main.php
CHANGED
@@ -103,11 +103,16 @@ class Main {
|
|
103 |
|
104 |
$attach_to_document_types = $this->get_documents_for_email( $email_id, $order );
|
105 |
foreach ( $attach_to_document_types as $document_type ) {
|
106 |
-
|
|
|
|
|
|
|
107 |
|
108 |
try {
|
109 |
// prepare document
|
110 |
-
|
|
|
|
|
111 |
if ( !$document ) { // something went wrong, continue trying with other documents
|
112 |
continue;
|
113 |
}
|
103 |
|
104 |
$attach_to_document_types = $this->get_documents_for_email( $email_id, $order );
|
105 |
foreach ( $attach_to_document_types as $document_type ) {
|
106 |
+
$email_order = apply_filters( 'wpo_wcpdf_email_attachment_order', $order, $email, $document_type );
|
107 |
+
$email_order_id = WCX_Order::get_id( $email_order );
|
108 |
+
|
109 |
+
do_action( 'wpo_wcpdf_before_attachment_creation', $email_order, $email_id, $document_type );
|
110 |
|
111 |
try {
|
112 |
// prepare document
|
113 |
+
// we use ID to force to reloading the order to make sure that all meta data is up to date.
|
114 |
+
// this is especially important when multiple emails with the PDF document are sent in the same session
|
115 |
+
$document = wcpdf_get_document( $document_type, (array) $email_order_id, true );
|
116 |
if ( !$document ) { // something went wrong, continue trying with other documents
|
117 |
continue;
|
118 |
}
|
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.2
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 2.3.
|
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.3.3 =
|
106 |
* Tweak: Move filter to override order object to document level (rather than per email)
|
107 |
|
5 |
Requires at least: 3.5
|
6 |
Tested up to: 5.2
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 2.3.4
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
102 |
|
103 |
== Changelog ==
|
104 |
|
105 |
+
= 2.3.4 =
|
106 |
+
* Fix: Prevent duplicate invoice numbers for multiple attachment setups
|
107 |
+
* Fix: Apply email order filter for each email separately
|
108 |
+
|
109 |
= 2.3.3 =
|
110 |
* Tweak: Move filter to override order object to document level (rather than per email)
|
111 |
|
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.3.
|
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.3.
|
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.3.4
|
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.3.4';
|
25 |
public $plugin_basename;
|
26 |
public $legacy_mode;
|
27 |
|