Version Description
- small bug fix
Download this release
Release Info
| Developer | FoxRunSoftware |
| Plugin | |
| Version | 1.0.1 |
| Comparing to | |
| See all releases | |
Code changes from version 1.0.0 to 1.0.1
- readme.txt +5 -2
- woocommerce-sequential-order-numbers.php +3 -3
readme.txt
CHANGED
|
@@ -3,7 +3,7 @@ Contributors: FoxRunSoftware
|
|
| 3 |
Tags: woocommerce, order number
|
| 4 |
Requires at least: 3.3
|
| 5 |
Tested up to: 3.3
|
| 6 |
-
Stable tag: 1.0.
|
| 7 |
|
| 8 |
This plugin extends the WooCommerce e-commerce plugin by setting sequential order numbers for new orders.
|
| 9 |
|
|
@@ -20,11 +20,14 @@ This plugin extends the WooCommerce e-commerce plugin by setting sequential orde
|
|
| 20 |
|
| 21 |
== Installation ==
|
| 22 |
|
| 23 |
-
1. Upload the entire 'woocommerce-
|
| 24 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
| 25 |
3. Order numbers will continue sequentially from the current highest order number, or from 1 if no orders have been placed yet
|
| 26 |
|
| 27 |
== Changelog ==
|
| 28 |
|
|
|
|
|
|
|
|
|
|
| 29 |
= 1.0.0 =
|
| 30 |
* Initial Release
|
| 3 |
Tags: woocommerce, order number
|
| 4 |
Requires at least: 3.3
|
| 5 |
Tested up to: 3.3
|
| 6 |
+
Stable tag: 1.0.1
|
| 7 |
|
| 8 |
This plugin extends the WooCommerce e-commerce plugin by setting sequential order numbers for new orders.
|
| 9 |
|
| 20 |
|
| 21 |
== Installation ==
|
| 22 |
|
| 23 |
+
1. Upload the entire 'woocommerce-sequential-order-number' folder to the '/wp-content/plugins/' directory
|
| 24 |
2. Activate the plugin through the 'Plugins' menu in WordPress
|
| 25 |
3. Order numbers will continue sequentially from the current highest order number, or from 1 if no orders have been placed yet
|
| 26 |
|
| 27 |
== Changelog ==
|
| 28 |
|
| 29 |
+
= 1.0.1 =
|
| 30 |
+
* small bug fix
|
| 31 |
+
|
| 32 |
= 1.0.0 =
|
| 33 |
* Initial Release
|
woocommerce-sequential-order-numbers.php
CHANGED
|
@@ -5,7 +5,7 @@ Plugin URI: http://www.foxrunsoftware.net/articles/wordpress/woocommerce-sequent
|
|
| 5 |
Description: Provides sequential order numbers for WooCommerce orders
|
| 6 |
Author: Justin Stern
|
| 7 |
Author URI: http://www.foxrunsoftware.net
|
| 8 |
-
Version: 1.0.
|
| 9 |
|
| 10 |
Copyright: © 2012 Justin Stern (email : justin@foxrunsoftware.net)
|
| 11 |
License: GNU General Public License v3.0
|
|
@@ -22,7 +22,7 @@ if (is_woocommerce_active()) {
|
|
| 22 |
if (!class_exists('WC_Seq_Order_Number')) {
|
| 23 |
|
| 24 |
class WC_Seq_Order_Number {
|
| 25 |
-
const VERSION = "1.0.
|
| 26 |
const VERSION_OPTION_NAME = "woocommerce_seq_order_number_db_version";
|
| 27 |
|
| 28 |
public function __construct() {
|
|
@@ -466,7 +466,7 @@ if (is_woocommerce_active()) {
|
|
| 466 |
|
| 467 |
// attempt the query up to 3 times for a much higher success rate if it fails (due to Deadlock)
|
| 468 |
$success = false;
|
| 469 |
-
for($i = 0; $i < 3; $i++) {
|
| 470 |
// this seems to me like the safest way to avoid order number clashes
|
| 471 |
$success = $wpdb->query($wpdb->prepare('INSERT INTO '.$wpdb->postmeta.' (post_id,meta_key,meta_value) SELECT '.$post_id.',"_order_number",if(max(cast(meta_value as UNSIGNED)) is null,1,max(cast(meta_value as UNSIGNED))+1) from '.$wpdb->postmeta.' where meta_key="_order_number"'));
|
| 472 |
}
|
| 5 |
Description: Provides sequential order numbers for WooCommerce orders
|
| 6 |
Author: Justin Stern
|
| 7 |
Author URI: http://www.foxrunsoftware.net
|
| 8 |
+
Version: 1.0.1
|
| 9 |
|
| 10 |
Copyright: © 2012 Justin Stern (email : justin@foxrunsoftware.net)
|
| 11 |
License: GNU General Public License v3.0
|
| 22 |
if (!class_exists('WC_Seq_Order_Number')) {
|
| 23 |
|
| 24 |
class WC_Seq_Order_Number {
|
| 25 |
+
const VERSION = "1.0.1";
|
| 26 |
const VERSION_OPTION_NAME = "woocommerce_seq_order_number_db_version";
|
| 27 |
|
| 28 |
public function __construct() {
|
| 466 |
|
| 467 |
// attempt the query up to 3 times for a much higher success rate if it fails (due to Deadlock)
|
| 468 |
$success = false;
|
| 469 |
+
for($i = 0; $i < 3 && !$success; $i++) {
|
| 470 |
// this seems to me like the safest way to avoid order number clashes
|
| 471 |
$success = $wpdb->query($wpdb->prepare('INSERT INTO '.$wpdb->postmeta.' (post_id,meta_key,meta_value) SELECT '.$post_id.',"_order_number",if(max(cast(meta_value as UNSIGNED)) is null,1,max(cast(meta_value as UNSIGNED))+1) from '.$wpdb->postmeta.' where meta_key="_order_number"'));
|
| 472 |
}
|
