WooCommerce Wishlist Plugin - Version 1.1.13

Version Description

Release Date - 16 March 2017

  • Fixed an issue when the Wishlist was not refreshed after the product is removed or added to cart by the unauthenticated user.
Download this release

Release Info

Developer templateinvaders
Plugin Icon 128x128 WooCommerce Wishlist Plugin
Version 1.1.13
Comparing to
See all releases

Code changes from version 1.1.12 to 1.1.13

includes/product/local.class.php CHANGED
@@ -34,6 +34,25 @@ class TInvWL_Product_Local {
34
  * @var integer
35
  */
36
  private $products_autoinc;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
37
 
38
  /**
39
  * Constructor
@@ -56,7 +75,7 @@ class TInvWL_Product_Local {
56
  $products = urldecode( $products );
57
  $products = @json_decode( $products, true ); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged
58
  if ( is_array( $products ) ) {
59
- $this->products = $products;
60
  }
61
  }
62
  }
34
  * @var integer
35
  */
36
  private $products_autoinc;
37
+ /**
38
+ * This class
39
+ *
40
+ * @var \TInvWL_Product_Local
41
+ */
42
+ protected static $_instance = null;
43
+
44
+ /**
45
+ * Get this class object
46
+ *
47
+ * @param string $plugin_name Plugin name.
48
+ * @return \TInvWL_Product_Local
49
+ */
50
+ public static function instance( $plugin_name = TINVWL_PREFIX ) {
51
+ if ( is_null( self::$_instance ) ) {
52
+ self::$_instance = new self( $plugin_name );
53
+ }
54
+ return self::$_instance;
55
+ }
56
 
57
  /**
58
  * Constructor
75
  $products = urldecode( $products );
76
  $products = @json_decode( $products, true ); // @codingStandardsIgnoreLine Generic.PHP.NoSilencedErrors.Discouraged
77
  if ( is_array( $products ) ) {
78
+ $tinv_wishlist = $this->products = $products;
79
  }
80
  }
81
  }
languages/ti-woocommerce-wishlist.pot CHANGED
@@ -3,7 +3,7 @@ msgid ""
3
  msgstr ""
4
  "Project-Id-Version: TI WooCommerce Wishlist\n"
5
  "Report-Msgid-Bugs-To: \n"
6
- "POT-Creation-Date: 2017-03-05 19:35+0700\n"
7
  "POT-Revision-Date: Sun Apr 10 2016 12:21:06 GMT+0200 (Västeuropa, "
8
  "sommartid)\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
3
  msgstr ""
4
  "Project-Id-Version: TI WooCommerce Wishlist\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2017-03-16 22:32+0700\n"
7
  "POT-Revision-Date: Sun Apr 10 2016 12:21:06 GMT+0200 (Västeuropa, "
8
  "sommartid)\n"
9
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
public/addtowishlist.class.php CHANGED
@@ -118,7 +118,7 @@ class TInvWL_Public_AddToWishlist {
118
  }
119
  $wlp = new TInvWL_Product( $wishlist, $this->_n );
120
  } else {
121
- $wlp = new TInvWL_Product_Local( $this->_n );
122
  }
123
 
124
  $status = true;
@@ -278,7 +278,7 @@ class TInvWL_Public_AddToWishlist {
278
  }
279
  } else {
280
  if ( empty( $wlp ) ) {
281
- $wlp = new TInvWL_Product_Local( $this->_n );
282
  }
283
  $wishlist = array(
284
  'ID' => 0,
118
  }
119
  $wlp = new TInvWL_Product( $wishlist, $this->_n );
120
  } else {
121
+ $wlp = TInvWL_Product_Local::instance( $this->_n );
122
  }
123
 
124
  $status = true;
278
  }
279
  } else {
280
  if ( empty( $wlp ) ) {
281
+ $wlp = TInvWL_Product_Local::instance( $this->_n );
282
  }
283
  $wishlist = array(
284
  'ID' => 0,
public/cart.class.php CHANGED
@@ -75,7 +75,7 @@ class TInvWL_Public_Cart {
75
  }
76
  $wlp = null;
77
  if ( 0 === $wishlist['ID'] ) {
78
- $wlp = new TInvWL_Product_Local();
79
  } else {
80
  $wlp = new TInvWL_Product( $wishlist );
81
  }
@@ -217,7 +217,7 @@ class TInvWL_Public_Cart {
217
  }
218
  $wlp = null;
219
  if ( 0 === $wishlist['ID'] ) {
220
- $wlp = new TInvWL_Product_Local();
221
  } else {
222
  $wlp = new TInvWL_Product( $wishlist, self::$_n );
223
  }
75
  }
76
  $wlp = null;
77
  if ( 0 === $wishlist['ID'] ) {
78
+ $wlp = TInvWL_Product_Local::instance();
79
  } else {
80
  $wlp = new TInvWL_Product( $wishlist );
81
  }
217
  }
218
  $wlp = null;
219
  if ( 0 === $wishlist['ID'] ) {
220
+ $wlp = TInvWL_Product_Local::instance();
221
  } else {
222
  $wlp = new TInvWL_Product( $wishlist, self::$_n );
223
  }
public/tinvwl.class.php CHANGED
@@ -387,7 +387,7 @@ class TInvWL_Public_TInvWL {
387
  * @param integer $user_id New user id.
388
  */
389
  function transfert_local_to_user_register( $user_id ) {
390
- $wlpl = new TInvWL_Product_Local( $this->_n );
391
 
392
  $wl = new TInvWL_Wishlist( $this->_n );
393
  $wl->user = $user_id;
387
  * @param integer $user_id New user id.
388
  */
389
  function transfert_local_to_user_register( $user_id ) {
390
+ $wlpl = TInvWL_Product_Local::instance( $this->_n );
391
 
392
  $wl = new TInvWL_Wishlist( $this->_n );
393
  $wl->user = $user_id;
public/wishlist/buttons.class.php CHANGED
@@ -328,7 +328,7 @@ class TInvWL_Public_Wishlist_Buttons {
328
  }
329
  $wlp = null;
330
  if ( 0 === $wishlist['ID'] ) {
331
- $wlp = new TInvWL_Product_Local( self::$_n );
332
  } else {
333
  $wlp = new TInvWL_Product( $wishlist, self::$_n );
334
  }
@@ -371,7 +371,7 @@ class TInvWL_Public_Wishlist_Buttons {
371
  }
372
  $wlp = null;
373
  if ( 0 === $wishlist['ID'] ) {
374
- $wlp = new TInvWL_Product_Local();
375
  } else {
376
  $wlp = new TInvWL_Product( $wishlist );
377
  }
328
  }
329
  $wlp = null;
330
  if ( 0 === $wishlist['ID'] ) {
331
+ $wlp = TInvWL_Product_Local::instance( self::$_n );
332
  } else {
333
  $wlp = new TInvWL_Product( $wishlist, self::$_n );
334
  }
371
  }
372
  $wlp = null;
373
  if ( 0 === $wishlist['ID'] ) {
374
+ $wlp = TInvWL_Product_Local::instance();
375
  } else {
376
  $wlp = new TInvWL_Product( $wishlist );
377
  }
public/wishlist/view.class.php CHANGED
@@ -114,7 +114,7 @@ class TInvWL_Public_Wishlist_View {
114
  }
115
  $wlp = null;
116
  if ( 0 === $wishlist['ID'] ) {
117
- $wlp = new TInvWL_Product_Local();
118
  } else {
119
  $wlp = new TInvWL_Product( $wishlist );
120
  }
@@ -227,7 +227,7 @@ class TInvWL_Public_Wishlist_View {
227
  }
228
  $product = $post['tinvwl-remove'];
229
  if ( 0 === $wishlist['ID'] ) {
230
- $wlp = new TInvWL_Product_Local();
231
  } else {
232
  $wlp = new TInvWL_Product( $wishlist );
233
  }
@@ -268,7 +268,7 @@ class TInvWL_Public_Wishlist_View {
268
 
269
  $wlp = null;
270
  if ( 0 === $wishlist['ID'] ) {
271
- $wlp = new TInvWL_Product_Local();
272
  } else {
273
  $wlp = new TInvWL_Product( $wishlist );
274
  }
114
  }
115
  $wlp = null;
116
  if ( 0 === $wishlist['ID'] ) {
117
+ $wlp = TInvWL_Product_Local::instance();
118
  } else {
119
  $wlp = new TInvWL_Product( $wishlist );
120
  }
227
  }
228
  $product = $post['tinvwl-remove'];
229
  if ( 0 === $wishlist['ID'] ) {
230
+ $wlp = TInvWL_Product_Local::instance();
231
  } else {
232
  $wlp = new TInvWL_Product( $wishlist );
233
  }
268
 
269
  $wlp = null;
270
  if ( 0 === $wishlist['ID'] ) {
271
+ $wlp = TInvWL_Product_Local::instance();
272
  } else {
273
  $wlp = new TInvWL_Product( $wishlist );
274
  }
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://templateinvaders.com/?utm_source=wordpressorg&utm_content=d
4
  Tags: wishlist, woocommerce, products, e-commerce, shop, ecommerce wishlist, woocommerce wishlist, woocommerce , shop wishlist, wishlist for Woocommerce
5
  Requires at least: 4.5
6
  Tested up to: 4.7.2
7
- Stable tag: 1.1.12
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
@@ -114,6 +114,11 @@ There are few ways to install TI WooCommerce Wishlist plugin:
114
 
115
  == Changelog ==
116
 
 
 
 
 
 
117
  = 1.1.12 =
118
  *Release Date - 05 March 2017*
119
 
4
  Tags: wishlist, woocommerce, products, e-commerce, shop, ecommerce wishlist, woocommerce wishlist, woocommerce , shop wishlist, wishlist for Woocommerce
5
  Requires at least: 4.5
6
  Tested up to: 4.7.2
7
+ Stable tag: 1.1.13
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
114
 
115
  == Changelog ==
116
 
117
+ = 1.1.13 =
118
+ *Release Date - 16 March 2017*
119
+
120
+ * Fixed an issue when the Wishlist was not refreshed after the product is removed or added to cart by the unauthenticated user.
121
+
122
  = 1.1.12 =
123
  *Release Date - 05 March 2017*
124
 
ti-woocommerce-wishlist.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: TI WooCommerce Wishlist
5
  * Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
- * Version: 1.1.12
8
  * Author: TemplateInvaders
9
  * Author URI: https://templateinvaders.com/
10
  * License: GPL-2.0+
@@ -37,7 +37,7 @@ if ( ! defined( 'TINVWL_DOMAIN' ) ) {
37
  }
38
 
39
  if ( ! defined( 'TINVWL_FVERSION' ) ) {
40
- define( 'TINVWL_FVERSION', '1.1.12' );
41
  }
42
 
43
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
4
  * Plugin Name: TI WooCommerce Wishlist
5
  * Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
+ * Version: 1.1.13
8
  * Author: TemplateInvaders
9
  * Author URI: https://templateinvaders.com/
10
  * License: GPL-2.0+
37
  }
38
 
39
  if ( ! defined( 'TINVWL_FVERSION' ) ) {
40
+ define( 'TINVWL_FVERSION', '1.1.13' );
41
  }
42
 
43
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {