Commit ad7609a8 authored by Reinhold Kainhofer's avatar Reinhold Kainhofer

V1.4.2: Allow checking for empty list in variable definitions by simply...

V1.4.2: Allow checking for empty list in variable definitions by simply leaving comparison field blank
parent 7366344d
BASE=ordernumbers
PLATTFORM=woocommerce
VENDOR=opentools
VERSION=1.4.1
VERSION=1.4.2
DIR = $(shell pwd)
SVNDIR=wordpress-plugin-svn
......
......@@ -300,7 +300,12 @@ class OrdernumberHelper {
case 'nocondition':
$match = true; break;
case 'equals':
$match = ($compareval == $condval); break;
if (is_array($compareval)) {
$match = ($condval == '') && empty($compareval);
} else {
$match = ($compareval == $condval);
}
break;
case 'contains':
if (is_array($compareval)) {
$match = in_array($condval, $compareval);
......
......@@ -242,7 +242,7 @@ class OpenToolsPluginUpdateChecker extends PluginUpdateChecker_2_1 {
} else {
$message = __('Unable to access plugin download URL. Please check your credentials.');
if ($this->debugMode) {
$message .= "<pre>updateinfo: ".print_r($updateinfo,1)."</pre>";
$message .= "<pre>updateinfo: ".htmlspecialchars(print_r($updateinfo,1))."</pre>";
}
}
return $success;
......
......@@ -367,6 +367,7 @@ class OpenToolsOrdernumbers extends OpenToolsOrdernumbersBasic {
public function setupThirdPartyReplacements (&$reps, $details, $nrtype) {
$reps = apply_filters( 'opentools_ordernumber_replacements', $reps, $details, $nrtype);
// error_log("All replacements: ".print_r($reps, 1));
}
......
......@@ -4,7 +4,7 @@ Contributors: opentools
Tags: WooCommerce, Order numbers, orders
Requires at least: 4.0
Tested up to: 4.8
Stable tag: 1.4.1
Stable tag: 1.4.2
License: GPLv3 or later
License URI: http://www.gnu.org/licenses/gpl.html
......@@ -78,6 +78,9 @@ The Advanced Ordernumbers for WooCommerce plugin supports some invoicing plugins
== Changelog ==
= 1.4.2 =
* Allow comparing arrays with empty value in the variable definitions
= 1.4.1 =
* Fix searching order numbers, sorting by order number in the order list
......
......@@ -3,7 +3,7 @@
* Plugin Name: Woocommerce Advanced Ordernumbers
* Plugin URI: http://open-tools.net/woocommerce/advanced-ordernumbers-for-woocommerce.html
* Description: Lets the user freely configure the order numbers in WooCommerce.
* Version: 1.4.1
* Version: 1.4.2
* Author: Open Tools
* Author URI: http://open-tools.net
* Text Domain: woocommerce-advanced-ordernumbers
......@@ -11,7 +11,7 @@
* License: GPL2+
* Network: true
* WC requires at least: 2.2
* WC tested up to: 3.0
* WC tested up to: 3.1
*/
if ( ! defined( 'ABSPATH' ) ) {
......
......@@ -3,14 +3,14 @@
* Plugin Name: WooCommerce Basic Ordernumbers
* Plugin URI: http://open-tools.net/woocommerce/advanced-ordernumbers-for-woocommerce.html
* Description: Configure WooCommerce ordernumbers to have a running counter and arbitrary, fixed text (prefix / postfix).
* Version: 1.4.1
* Version: 1.4.2
* Author: Open Tools
* Author URI: http://open-tools.net
* Text Domain: woocommerce-advanced-ordernumbers
* License: GPL2+
* Network: true
* WC requires at least: 2.2
* WC tested up to: 3.0
* WC tested up to: 3.1
*/
if ( ! defined( 'ABSPATH' ) ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment