WooCommerce Sequential Order Numbers - Version 1.8.3

Version Description

Download this release

Release Info

Developer SkyVerge
Plugin Icon WooCommerce Sequential Order Numbers
Version 1.8.3
Comparing to
See all releases

Code changes from version 1.8.2 to 1.8.3

i18n/languages/woocommerce-sequential-order-numbers.pot CHANGED
@@ -1,29 +1,29 @@
1
- # Copyright (C) 2017 SkyVerge
2
# This file is distributed under the GNU General Public License v3.0.
3
msgid ""
4
msgstr ""
5
- "Project-Id-Version: WooCommerce Sequential Order Numbers 1.8.2\n"
6
"Report-Msgid-Bugs-To: "
7
- "https://github.com/skyverge/woocommerce-sequential-order-numbers/issues\n"
8
- "POT-Creation-Date: 2014-09-05 22:27:38+00:00\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=utf-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
- "PO-Revision-Date: 2017-MO-DA HO:MI+ZONE\n"
13
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
"Language-Team: LANGUAGE <LL@li.org>\n"
15
16
- #: woocommerce-sequential-order-numbers.php:67
17
#. translators: Placeholders: %s - plugin name
18
msgid "You cannot clone instances of %s."
19
msgstr ""
20
21
- #: woocommerce-sequential-order-numbers.php:79
22
#. translators: Placeholders: %s - plugin name
23
msgid "You cannot unserialize instances of %s."
24
msgstr ""
25
26
- #: woocommerce-sequential-order-numbers.php:487
27
#. translators: Placeholders: %1$s - plugin name; %2$s - WooCommerce version;
28
#. %3$s, %5$s - <a> tags; %4$s - </a> tag
29
msgid ""
@@ -31,14 +31,14 @@ msgid ""
31
"%3$supdate WooCommerce%4$s or run the %5$sWooCommerce database upgrade%4$s."
32
msgstr ""
33
34
- #: woocommerce-sequential-order-numbers.php:529
35
#. Translators: %s - error message(s)
36
msgid ""
37
"Error activating and installing <strong>WooCommerce Sequential Order "
38
"Numbers</strong>: %s"
39
msgstr ""
40
41
- #: woocommerce-sequential-order-numbers.php:530
42
msgid "&laquo; Go Back"
43
msgstr ""
44
1
+ # Copyright (C) 2018 SkyVerge
2
# This file is distributed under the GNU General Public License v3.0.
3
msgid ""
4
msgstr ""
5
+ "Project-Id-Version: WooCommerce Sequential Order Numbers 1.8.3\n"
6
"Report-Msgid-Bugs-To: "
7
+ "https://woocommerce.com/my-account/marketplace-ticket-form/\n"
8
+ "POT-Creation-Date: 2018-07-17 23:45:46+00:00\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=utf-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
+ "PO-Revision-Date: 2018-MO-DA HO:MI+ZONE\n"
13
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14
"Language-Team: LANGUAGE <LL@li.org>\n"
15
16
+ #: woocommerce-sequential-order-numbers.php:70
17
#. translators: Placeholders: %s - plugin name
18
msgid "You cannot clone instances of %s."
19
msgstr ""
20
21
+ #: woocommerce-sequential-order-numbers.php:82
22
#. translators: Placeholders: %s - plugin name
23
msgid "You cannot unserialize instances of %s."
24
msgstr ""
25
26
+ #: woocommerce-sequential-order-numbers.php:527
27
#. translators: Placeholders: %1$s - plugin name; %2$s - WooCommerce version;
28
#. %3$s, %5$s - <a> tags; %4$s - </a> tag
29
msgid ""
31
"%3$supdate WooCommerce%4$s or run the %5$sWooCommerce database upgrade%4$s."
32
msgstr ""
33
34
+ #: woocommerce-sequential-order-numbers.php:569
35
#. Translators: %s - error message(s)
36
msgid ""
37
"Error activating and installing <strong>WooCommerce Sequential Order "
38
"Numbers</strong>: %s"
39
msgstr ""
40
41
+ #: woocommerce-sequential-order-numbers.php:570
42
msgid "&laquo; Go Back"
43
msgstr ""
44
readme.txt CHANGED
@@ -1,11 +1,9 @@
1
=== WooCommerce Sequential Order Numbers ===
2
Contributors: SkyVerge, maxrice, tamarazuk, chasewiseman, nekojira, beka.rice
3
Tags: woocommerce, order number, sequential order number, woocommerce orders
4
- Requires at least: 4.1
5
- Tested up to: 4.8.1
6
- WC requires at least: 2.5.5
7
- WC tested up to: 3.1.0
8
- Stable tag: 1.8.2
9
10
This plugin extends WooCommerce by setting sequential order numbers for new orders.
11
@@ -13,7 +11,7 @@ This plugin extends WooCommerce by setting sequential order numbers for new orde
13
14
This plugin extends WooCommerce by automatically setting sequential order numbers for new orders. If there are existing orders at the time of installation, the sequential order numbers will start with the highest current order number.
15
16
- **This plugin requires WooCommerce 2.5.5 or newer.**
17
18
> No configuration needed! The plugin is so easy to use, there aren't even any settings. Activate it, and orders will automatically become sequential.
19
@@ -103,6 +101,9 @@ $order_number = $order->get_order_number();
103
104
== Changelog ==
105
106
= 1.8.2 - 2017.08.22 =
107
* Fix - PHP deprecation warning when Subscriptions is used
108
* Misc - Removed support for WooCommerce Subscriptions older than v2.0
1
=== WooCommerce Sequential Order Numbers ===
2
Contributors: SkyVerge, maxrice, tamarazuk, chasewiseman, nekojira, beka.rice
3
Tags: woocommerce, order number, sequential order number, woocommerce orders
4
+ Requires at least: 4.4
5
+ Tested up to: 4.9.7
6
+ Stable tag: 1.8.3
7
8
This plugin extends WooCommerce by setting sequential order numbers for new orders.
9
11
12
This plugin extends WooCommerce by automatically setting sequential order numbers for new orders. If there are existing orders at the time of installation, the sequential order numbers will start with the highest current order number.
13
14
+ **This plugin requires WooCommerce 2.6.14 or newer.**
15
16
> No configuration needed! The plugin is so easy to use, there aren't even any settings. Activate it, and orders will automatically become sequential.
17
101
102
== Changelog ==
103
104
+ = 2018.07.17 - version 1.8.3 =
105
+ * Misc - Require WooCommerce 2.6.14+ and WordPress 4.4+
106
+
107
= 1.8.2 - 2017.08.22 =
108
* Fix - PHP deprecation warning when Subscriptions is used
109
* Misc - Removed support for WooCommerce Subscriptions older than v2.0
woocommerce-sequential-order-numbers.php CHANGED
@@ -5,11 +5,11 @@
5
* Description: Provides sequential order numbers for WooCommerce orders
6
* Author: SkyVerge
7
* Author URI: http://www.skyverge.com
8
- * Version: 1.8.2
9
* Text Domain: woocommerce-sequential-order-numbers
10
* Domain Path: /i18n/languages/
11
*
12
- * Copyright: (c) 2012-2017, SkyVerge, Inc. (info@skyverge.com)
13
*
14
* License: GNU General Public License v3.0
15
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
@@ -17,14 +17,17 @@
17
* @package WC-Sequential-Order-Numbers
18
* @author SkyVerge
19
* @category Plugin
20
- * @copyright Copyright (c) 2012-2017, SkyVerge, Inc.
21
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
22
*/
23
24
defined( 'ABSPATH' ) or exit;
25
26
// Check if WooCommerce is active
27
- if ( ! WC_Seq_Order_Number::is_woocommerce_active() ) {
28
return;
29
}
30
@@ -32,7 +35,10 @@ class WC_Seq_Order_Number {
32
33
34
/** version number */
35
- const VERSION = '1.8.2';
36
37
/** @var \WC_Seq_Order_Number single instance of this plugin */
38
protected static $instance;
@@ -40,9 +46,6 @@ class WC_Seq_Order_Number {
40
/** version option name */
41
const VERSION_OPTION_NAME = 'woocommerce_seq_order_number_db_version';
42
43
- /** minimum required wc version */
44
- const MINIMUM_WC_VERSION = '2.5.5';
45
-
46
47
/**
48
* Construct the plugin
@@ -352,17 +355,52 @@ class WC_Seq_Order_Number {
352
* Checks if WooCommerce is active
353
*
354
* @since 1.3
355
* @return bool true if WooCommerce is active, false otherwise
356
*/
357
public static function is_woocommerce_active() {
358
359
$active_plugins = (array) get_option( 'active_plugins', array() );
360
361
if ( is_multisite() ) {
362
- $active_plugins = array_merge( $active_plugins, get_site_option( 'active_sitewide_plugins', array() ) );
363
}
364
365
- return in_array( 'woocommerce/woocommerce.php', $active_plugins ) || array_key_exists( 'woocommerce/woocommerce.php', $active_plugins );
366
}
367
368
@@ -460,6 +498,8 @@ class WC_Seq_Order_Number {
460
*/
461
private function minimum_wc_version_met() {
462
463
// if a plugin defines a minimum WC version, render a notice and skip loading the plugin
464
if ( defined( 'self::MINIMUM_WC_VERSION' ) && version_compare( self::get_wc_version(), self::MINIMUM_WC_VERSION, '<' ) ) {
465
@@ -468,10 +508,10 @@ class WC_Seq_Order_Number {
468
add_action( 'admin_notices', array( $this, 'render_update_notices' ) );
469
}
470
471
- return false;
472
}
473
474
- return true;
475
}
476
477
@@ -585,13 +625,5 @@ function wc_sequential_order_numbers() {
585
}
586
587
588
- /**
589
- * The WC_Seq_Order_Number global object
590
- *
591
- * TODO: Remove the global with WC 3.1 compat {BR 2017-03-21}
592
- *
593
- * @deprecated 1.7.0
594
- * @name $wc_seq_order_number
595
- * @global WC_Seq_Order_Number $GLOBALS['wc_seq_order_number']
596
- */
597
- $GLOBALS['wc_seq_order_number'] = wc_sequential_order_numbers();
5
* Description: Provides sequential order numbers for WooCommerce orders
6
* Author: SkyVerge
7
* Author URI: http://www.skyverge.com
8
+ * Version: 1.8.3
9
* Text Domain: woocommerce-sequential-order-numbers
10
* Domain Path: /i18n/languages/
11
*
12
+ * Copyright: (c) 2012-2018, SkyVerge, Inc. (info@skyverge.com)
13
*
14
* License: GNU General Public License v3.0
15
* License URI: http://www.gnu.org/licenses/gpl-3.0.html
17
* @package WC-Sequential-Order-Numbers
18
* @author SkyVerge
19
* @category Plugin
20
+ * @copyright Copyright (c) 2012-2018, SkyVerge, Inc.
21
* @license http://www.gnu.org/licenses/gpl-3.0.html GNU General Public License v3.0
22
+ *
23
+ * WC requires at least: 2.6.14
24
+ * WC tested up to: 3.4.3
25
*/
26
27
defined( 'ABSPATH' ) or exit;
28
29
// Check if WooCommerce is active
30
+ if ( ! WC_Seq_Order_Number::is_plugin_active( 'woocommerce.php' ) ) {
31
return;
32
}
33
35
36
37
/** version number */
38
+ const VERSION = '1.8.3';
39
+
40
+ /** minimum required wc version */
41
+ const MINIMUM_WC_VERSION = '2.6.14';
42
43
/** @var \WC_Seq_Order_Number single instance of this plugin */
44
protected static $instance;
46
/** version option name */
47
const VERSION_OPTION_NAME = 'woocommerce_seq_order_number_db_version';
48
49
50
/**
51
* Construct the plugin
355
* Checks if WooCommerce is active
356
*
357
* @since 1.3
358
+ * @deprecated 1.8.3
359
+ *
360
* @return bool true if WooCommerce is active, false otherwise
361
*/
362
public static function is_woocommerce_active() {
363
364
+ _deprecated_function( 'WC_Seq_Order_Number::is_woocommerce_active', '1.8.3', 'WC_Seq_Order_Number::is_plugin_active' );
365
+ return self::is_plugin_active( 'woocommerce.php' );
366
+ }
367
+
368
+
369
+ /**
370
+ * Helper function to determine whether a plugin is active.
371
+ *
372
+ * @since 1.8.3
373
+ *
374
+ * @param string $plugin_name plugin name, as the plugin-filename.php
375
+ * @return boolean true if the named plugin is installed and active
376
+ */
377
+ public static function is_plugin_active( $plugin_name ) {
378
+
379
$active_plugins = (array) get_option( 'active_plugins', array() );
380
381
if ( is_multisite() ) {
382
+ $active_plugins = array_merge( $active_plugins, array_keys( get_site_option( 'active_sitewide_plugins', array() ) ) );
383
}
384
385
+ $plugin_filenames = array();
386
+
387
+ foreach ( $active_plugins as $plugin ) {
388
+
389
+ if ( false !== strpos( $plugin, '/' ) ) {
390
+
391
+ // normal plugin name (plugin-dir/plugin-filename.php)
392
+ list( , $filename ) = explode( '/', $plugin );
393
+
394
+ } else {
395
+
396
+ // no directory, just plugin file
397
+ $filename = $plugin;
398
+ }
399
+
400
+ $plugin_filenames[] = $filename;
401
+ }
402
+
403
+ return in_array( $plugin_name, $plugin_filenames );
404
}
405
406
498
*/
499
private function minimum_wc_version_met() {
500
501
+ $version_met = true;
502
+
503
// if a plugin defines a minimum WC version, render a notice and skip loading the plugin
504
if ( defined( 'self::MINIMUM_WC_VERSION' ) && version_compare( self::get_wc_version(), self::MINIMUM_WC_VERSION, '<' ) ) {
505
508
add_action( 'admin_notices', array( $this, 'render_update_notices' ) );
509
}
510
511
+ $version_met = false;
512
}
513
514
+ return $version_met;
515
}
516
517
625
}
626
627
628
+ // fire it up!
629
+ wc_sequential_order_numbers();