Version Description
- Fix: Double check to make sure plugin doesn't attach to user emails
Download this release
Release Info
Developer | pomegranate |
Plugin | WooCommerce PDF Invoices & Packing Slips |
Version | 1.5.10 |
Comparing to | |
See all releases |
Code changes from version 1.5.9 to 1.5.10
includes/class-wcpdf-export.php
CHANGED
@@ -461,7 +461,12 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
|
|
461 |
*/
|
462 |
public function attach_pdf_to_email ( $attachments, $status, $order ) {
|
463 |
// check if all variables properly set
|
464 |
-
if ( !is_object( $order ) || !isset( $
|
|
|
|
|
|
|
|
|
|
|
465 |
return $attachments;
|
466 |
}
|
467 |
|
@@ -472,7 +477,7 @@ if ( ! class_exists( 'WooCommerce_PDF_Invoices_Export' ) ) {
|
|
472 |
}
|
473 |
|
474 |
// do not process low stock notifications, user emails etc!
|
475 |
-
if ( in_array( $status, array( 'no_stock', 'low_stock', 'backorder' ) ) || get_post_type( $order->id ) != 'shop_order' ) {
|
476 |
return $attachments;
|
477 |
}
|
478 |
|
461 |
*/
|
462 |
public function attach_pdf_to_email ( $attachments, $status, $order ) {
|
463 |
// check if all variables properly set
|
464 |
+
if ( !is_object( $order ) || !isset( $status ) ) {
|
465 |
+
return $attachments;
|
466 |
+
}
|
467 |
+
|
468 |
+
// Skip User emails
|
469 |
+
if ( get_class( $order ) == 'WP_User' ) {
|
470 |
return $attachments;
|
471 |
}
|
472 |
|
477 |
}
|
478 |
|
479 |
// do not process low stock notifications, user emails etc!
|
480 |
+
if ( in_array( $status, array( 'no_stock', 'low_stock', 'backorder', 'customer_new_account', 'customer_reset_password' ) ) || get_post_type( $order->id ) != 'shop_order' ) {
|
481 |
return $attachments;
|
482 |
}
|
483 |
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: pomegranate
|
|
3 |
Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice, packing slip, export, email, bulk, automatic
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.1
|
6 |
-
Stable tag: 1.5.
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
@@ -233,6 +233,9 @@ This usually only happens on batch actions. PDF creation is a memory intensive j
|
|
233 |
|
234 |
== Changelog ==
|
235 |
|
|
|
|
|
|
|
236 |
= 1.5.9 =
|
237 |
* Feature: Shorthand function to display product attributes: `$wpo_wcpdf->get_product_attribute( $attribute_name, $product )`
|
238 |
|
@@ -499,5 +502,5 @@ This usually only happens on batch actions. PDF creation is a memory intensive j
|
|
499 |
|
500 |
== Upgrade Notice ==
|
501 |
|
502 |
-
= 1.5.
|
503 |
Version 1.5 changes where temporary files are stored - everything is now stored centrally in the WP uploads folder. For backwards compatibility, this feature is turned off by default, but we recommend to use the new folders. Check the plugin Status panel for more information!
|
3 |
Tags: woocommerce, pdf, invoices, packing slips, print, delivery notes, invoice, packing slip, export, email, bulk, automatic
|
4 |
Requires at least: 3.5
|
5 |
Tested up to: 4.1
|
6 |
+
Stable tag: 1.5.10
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
233 |
|
234 |
== Changelog ==
|
235 |
|
236 |
+
= 1.5.10 =
|
237 |
+
* Fix: Double check to make sure plugin doesn't attach to user emails
|
238 |
+
|
239 |
= 1.5.9 =
|
240 |
* Feature: Shorthand function to display product attributes: `$wpo_wcpdf->get_product_attribute( $attribute_name, $product )`
|
241 |
|
502 |
|
503 |
== Upgrade Notice ==
|
504 |
|
505 |
+
= 1.5.10 =
|
506 |
Version 1.5 changes where temporary files are stored - everything is now stored centrally in the WP uploads folder. For backwards compatibility, this feature is turned off by default, but we recommend to use the new folders. Check the plugin Status panel for more information!
|
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: 1.5.
|
7 |
* Author: Ewout Fernhout
|
8 |
* Author URI: http://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
@@ -33,7 +33,7 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
|
|
33 |
self::$plugin_basename = plugin_basename(__FILE__);
|
34 |
self::$plugin_url = plugin_dir_url(self::$plugin_basename);
|
35 |
self::$plugin_path = trailingslashit(dirname(__FILE__));
|
36 |
-
self::$version = '1.5.
|
37 |
|
38 |
// load the localisation & classes
|
39 |
add_action( 'plugins_loaded', array( $this, 'translations' ) ); // or use init?
|
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: 1.5.10
|
7 |
* Author: Ewout Fernhout
|
8 |
* Author URI: http://www.wpovernight.com
|
9 |
* License: GPLv2 or later
|
33 |
self::$plugin_basename = plugin_basename(__FILE__);
|
34 |
self::$plugin_url = plugin_dir_url(self::$plugin_basename);
|
35 |
self::$plugin_path = trailingslashit(dirname(__FILE__));
|
36 |
+
self::$version = '1.5.10';
|
37 |
|
38 |
// load the localisation & classes
|
39 |
add_action( 'plugins_loaded', array( $this, 'translations' ) ); // or use init?
|