WooCommerce PDF Invoices - Version 2.5.1

Version Description

  • January 5, 2017 =

  • Fixed: "Warning: array_merge(): Argument #2 is not an array" by casting empty get_option to array.

  • Fixed: "Parse error: syntax error, unexpected T_OBJECT_OPERATOR" by not using class member access on instantiation.

Download this release

Release Info

Developer baaaaas
Plugin Icon 128x128 WooCommerce PDF Invoices
Version 2.5.1
Comparing to
See all releases

Code changes from version 2.5.0 to 2.5.1

bootstrap.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce PDF Invoices
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-pdf-invoices
5
  * Description: Automatically generate and attach customizable PDF Invoices to WooCommerce emails and connect with Dropbox, Google Drive, OneDrive or Egnyte.
6
- * Version: 2.5.0
7
  * Author: Bas Elbers
8
  * Author URI: http://wcpdfinvoices.com
9
  * License: GPL-2.0+
@@ -16,7 +16,7 @@ if ( ! defined( 'ABSPATH' ) ) {
16
  exit;
17
  }
18
 
19
- define( 'BEWPI_VERSION', '2.5.0' );
20
 
21
  /**
22
  * Load WooCommerce PDF Invoices plugin.
@@ -74,8 +74,8 @@ function _bewpi_on_plugin_update() {
74
  */
75
  function _bewpi_on_plugin_activation() {
76
  // save install date for plugin activation admin notice.
77
- $now = ( new \DateTime() )->format( 'Y-m-d' );
78
- update_site_option( 'bewpi-install-date', $now );
79
 
80
  // use transient to display activation admin notice.
81
  set_transient( 'bewpi-admin-notice-activation', true, 30 );
3
  * Plugin Name: WooCommerce PDF Invoices
4
  * Plugin URI: https://wordpress.org/plugins/woocommerce-pdf-invoices
5
  * Description: Automatically generate and attach customizable PDF Invoices to WooCommerce emails and connect with Dropbox, Google Drive, OneDrive or Egnyte.
6
+ * Version: 2.5.1
7
  * Author: Bas Elbers
8
  * Author URI: http://wcpdfinvoices.com
9
  * License: GPL-2.0+
16
  exit;
17
  }
18
 
19
+ define( 'BEWPI_VERSION', '2.5.1' );
20
 
21
  /**
22
  * Load WooCommerce PDF Invoices plugin.
74
  */
75
  function _bewpi_on_plugin_activation() {
76
  // save install date for plugin activation admin notice.
77
+ $now = new DateTime();
78
+ update_site_option( 'bewpi-install-date', $now->format( 'Y-m-d' ) );
79
 
80
  // use transient to display activation admin notice.
81
  set_transient( 'bewpi-admin-notice-activation', true, 30 );
includes/admin/settings/class-bewpi-admin-settings-general.php CHANGED
@@ -260,7 +260,7 @@ if ( ! class_exists( 'BEWPI_General_Settings' ) ) {
260
  */
261
  public function load_settings() {
262
  $defaults = $this->get_defaults();
263
- $options = get_option( self::SETTINGS_KEY );
264
  $options = array_merge( $defaults, $options );
265
  update_option( self::SETTINGS_KEY, $options );
266
  }
260
  */
261
  public function load_settings() {
262
  $defaults = $this->get_defaults();
263
+ $options = (array) get_option( self::SETTINGS_KEY );
264
  $options = array_merge( $defaults, $options );
265
  update_option( self::SETTINGS_KEY, $options );
266
  }
includes/admin/settings/class-bewpi-admin-settings-template.php CHANGED
@@ -480,7 +480,7 @@ if ( ! class_exists( 'BEWPI_Template_Settings' ) ) {
480
  */
481
  public function load_settings() {
482
  $defaults = $this->get_defaults();
483
- $options = get_option( self::SETTINGS_KEY );
484
  $options = array_merge( $defaults, $options );
485
  update_option( self::SETTINGS_KEY, $options );
486
  }
480
  */
481
  public function load_settings() {
482
  $defaults = $this->get_defaults();
483
+ $options = (array) get_option( self::SETTINGS_KEY );
484
  $options = array_merge( $defaults, $options );
485
  update_option( self::SETTINGS_KEY, $options );
486
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link:
4
  Tags: woocommerce pdf invoices, invoice, generate, pdf, woocommerce, attachment, email, completed order, customer invoice, processing order, attach, automatic, vat, rate, sequential, number
5
  Requires at least: 4.0
6
  Tested up to: 4.7
7
- Stable tag: 2.5.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -217,6 +217,11 @@ add_filter( 'bewpi_formatted_invoice_number', 'alter_formatted_invoice_number',
217
 
218
  == Changelog ==
219
 
 
 
 
 
 
220
  = 2.5.0 - January 5, 2017 =
221
 
222
  - Added: Invoice number column on Shop Order page.
4
  Tags: woocommerce pdf invoices, invoice, generate, pdf, woocommerce, attachment, email, completed order, customer invoice, processing order, attach, automatic, vat, rate, sequential, number
5
  Requires at least: 4.0
6
  Tested up to: 4.7
7
+ Stable tag: 2.5.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
217
 
218
  == Changelog ==
219
 
220
+ = 2.5.1 - January 5, 2017 =
221
+
222
+ - Fixed: "Warning: array_merge(): Argument #2 is not an array" by casting empty get_option to array.
223
+ - Fixed: "Parse error: syntax error, unexpected T_OBJECT_OPERATOR" by not using class member access on instantiation.
224
+
225
  = 2.5.0 - January 5, 2017 =
226
 
227
  - Added: Invoice number column on Shop Order page.