Version Description
- Fix: prevent errors when upgrading
Download this release
Release Info
Developer | pomegranate |
Plugin | WooCommerce PDF Invoices & Packing Slips |
Version | 1.5.1 |
Comparing to | |
See all releases |
Code changes from version 1.5.0 to 1.5.1
- readme.txt +5 -2
- woocommerce-pdf-invoices-packingslips.php +10 -5
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 |
|
@@ -248,6 +248,9 @@ This usually only happens on batch actions. PDF creation is a memory intensive j
|
|
248 |
|
249 |
== Changelog ==
|
250 |
|
|
|
|
|
|
|
251 |
= 1.5.0 =
|
252 |
* Feature: All temporary files are now stored centrally in the WP uploads folder.
|
253 |
* Feature: Debug settings in status panel (output errors & output to HTML)
|
@@ -460,5 +463,5 @@ This usually only happens on batch actions. PDF creation is a memory intensive j
|
|
460 |
|
461 |
== Upgrade Notice ==
|
462 |
|
463 |
-
= 1.5.
|
464 |
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.1
|
7 |
License: GPLv2 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
9 |
|
248 |
|
249 |
== Changelog ==
|
250 |
|
251 |
+
= 1.5.1 =
|
252 |
+
* Fix: prevent errors when upgrading
|
253 |
+
|
254 |
= 1.5.0 =
|
255 |
* Feature: All temporary files are now stored centrally in the WP uploads folder.
|
256 |
* Feature: Debug settings in status panel (output errors & output to HTML)
|
463 |
|
464 |
== Upgrade Notice ==
|
465 |
|
466 |
+
= 1.5.1 =
|
467 |
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?
|
@@ -176,7 +176,7 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
|
|
176 |
protected function upgrade( $installed_version ) {
|
177 |
if ( $installed_version == 'versionless') { // versionless = 1.4.14 and older
|
178 |
// We're upgrading from an old version, so we're enabling the option to use the plugin tmp folder.
|
179 |
-
// This is not per se the 'best' solution, but the good thing is that nothing is changed
|
180 |
// and nothing will be broken (that wasn't broken before)
|
181 |
$default = array( 'old_tmp' => 1 );
|
182 |
update_option( 'wpo_wcpdf_debug_settings', $default );
|
@@ -185,10 +185,15 @@ if ( !class_exists( 'WooCommerce_PDF_Invoices' ) ) {
|
|
185 |
// sync fonts on every upgrade!
|
186 |
$debug_settings = get_option( 'wpo_wcpdf_debug_settings' ); // get temp setting
|
187 |
|
188 |
-
// do not copy if old_tmp function active!
|
189 |
-
if ( !isset($this->debug_settings['old_tmp']) ) {
|
190 |
$tmp_base = $this->export->get_tmp_base();
|
191 |
|
|
|
|
|
|
|
|
|
|
|
192 |
$font_path = $tmp_base . 'fonts/';
|
193 |
$this->export->copy_fonts( $font_path );
|
194 |
}
|
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.1
|
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.1';
|
37 |
|
38 |
// load the localisation & classes
|
39 |
add_action( 'plugins_loaded', array( $this, 'translations' ) ); // or use init?
|
176 |
protected function upgrade( $installed_version ) {
|
177 |
if ( $installed_version == 'versionless') { // versionless = 1.4.14 and older
|
178 |
// We're upgrading from an old version, so we're enabling the option to use the plugin tmp folder.
|
179 |
+
// This is not per se the 'best' solution, but the good thing is that nothing is changed
|
180 |
// and nothing will be broken (that wasn't broken before)
|
181 |
$default = array( 'old_tmp' => 1 );
|
182 |
update_option( 'wpo_wcpdf_debug_settings', $default );
|
185 |
// sync fonts on every upgrade!
|
186 |
$debug_settings = get_option( 'wpo_wcpdf_debug_settings' ); // get temp setting
|
187 |
|
188 |
+
// do not copy if old_tmp function active! (double check for slow databases)
|
189 |
+
if ( !( isset($this->debug_settings['old_tmp']) || $installed_version == 'versionless' ) ) {
|
190 |
$tmp_base = $this->export->get_tmp_base();
|
191 |
|
192 |
+
// check if tmp folder exists => if not, initialize
|
193 |
+
if ( !@is_dir( $tmp_base ) ) {
|
194 |
+
$this->export->init_tmp( $tmp_base );
|
195 |
+
}
|
196 |
+
|
197 |
$font_path = $tmp_base . 'fonts/';
|
198 |
$this->export->copy_fonts( $font_path );
|
199 |
}
|