WooCommerce Sequential Order Numbers - Version 1.1.1

Version Description

  • Order number in the subject line of the admin new order email is fixed
Download this release

Release Info

Developer FoxRunSoftware
Plugin Icon WooCommerce Sequential Order Numbers
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.1

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.1.0
7
 
8
  This plugin extends the WooCommerce e-commerce plugin by setting sequential order numbers for new orders.
9
 
@@ -11,6 +11,8 @@ This plugin extends the WooCommerce e-commerce plugin by setting sequential orde
11
 
12
  This plugin extends the WooCommerce e-commerce plugin by 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
  = Feedback =
15
  * I am open to your suggestions and feedback - Thank you for using or trying out one of my plugins!
16
  * Drop me a line at [www.foxrunsoftware.com](http://www.foxrunsoftware.com)
@@ -26,7 +28,10 @@ This plugin extends the WooCommerce e-commerce plugin by setting sequential orde
26
 
27
  == Changelog ==
28
 
29
- = 1.0.1 =
 
 
 
30
  * Search by order number
31
 
32
  = 1.0.1 =
3
  Tags: woocommerce, order number
4
  Requires at least: 3.3
5
  Tested up to: 3.3
6
+ Stable tag: 1.1.1
7
 
8
  This plugin extends the WooCommerce e-commerce plugin by setting sequential order numbers for new orders.
9
 
11
 
12
  This plugin extends the WooCommerce e-commerce plugin by 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 1.5.3 or greater.
15
+
16
  = Feedback =
17
  * I am open to your suggestions and feedback - Thank you for using or trying out one of my plugins!
18
  * Drop me a line at [www.foxrunsoftware.com](http://www.foxrunsoftware.com)
28
 
29
  == Changelog ==
30
 
31
+ = 1.1.1 =
32
+ * Order number in the subject line of the admin new order email is fixed
33
+
34
+ = 1.1.0 =
35
  * Search by order number
36
 
37
  = 1.0.1 =
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.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.1.0";
26
  const VERSION_OPTION_NAME = "woocommerce_seq_order_number_db_version";
27
 
28
  public function __construct() {
@@ -31,6 +31,7 @@ if (is_woocommerce_active()) {
31
  add_action('woocommerce_init', array(&$this, 'woocommerce_loaded' ));
32
  add_action('wp_insert_post', array(&$this, 'set_sequential_order_number'), 10, 2);
33
  add_filter('woocommerce_order_number', array(&$this, 'get_order_number'), 10, 2);
 
34
 
35
  // Installation
36
  if (is_admin() && !defined('DOING_AJAX')) $this->install();
@@ -556,6 +557,16 @@ if (is_woocommerce_active()) {
556
  }
557
 
558
 
 
 
 
 
 
 
 
 
 
 
559
  /**
560
  * Run every time. Used since the activation hook is not executed when updating a plugin
561
  */
5
  Description: Provides sequential order numbers for WooCommerce orders
6
  Author: Justin Stern
7
  Author URI: http://www.foxrunsoftware.net
8
+ Version: 1.1.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.1.1";
26
  const VERSION_OPTION_NAME = "woocommerce_seq_order_number_db_version";
27
 
28
  public function __construct() {
31
  add_action('woocommerce_init', array(&$this, 'woocommerce_loaded' ));
32
  add_action('wp_insert_post', array(&$this, 'set_sequential_order_number'), 10, 2);
33
  add_filter('woocommerce_order_number', array(&$this, 'get_order_number'), 10, 2);
34
+ add_filter('woocommerce_email_subject_new_order', array(&$this, 'email_subject_new_order'), 10, 2);
35
 
36
  // Installation
37
  if (is_admin() && !defined('DOING_AJAX')) $this->install();
557
  }
558
 
559
 
560
+ /**
561
+ * Fix the admin new order email
562
+ */
563
+ function email_subject_new_order($subject, $order) {
564
+ $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
565
+
566
+ return sprintf( __( '[%s] New Customer Order (%s)', 'woocommerce' ), $blogname, $order->get_order_number() );
567
+ }
568
+
569
+
570
  /**
571
  * Run every time. Used since the activation hook is not executed when updating a plugin
572
  */