WooCommerce Wishlist Plugin - Version 1.1.10

Version Description

Release Date - 02 March 2017

  • The Setup Wizard enhancements
  • Added new hooks for wishlist create|update|delete and wishlist product add|update|remove events
Download this release

Release Info

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

Code changes from version 1.1.9 to 1.1.10

admin/tinvwl.class.php CHANGED
@@ -65,18 +65,41 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base {
65
  function define_hooks() {
66
  add_action( 'init', array( $this, 'action_session' ), 1 );
67
  add_action( 'admin_menu', array( $this, 'action_menu' ) );
68
- if ( ! tinv_get_option( 'page', 'wishlist' ) ) {
 
 
 
 
 
69
  add_action( 'admin_notices', array( $this, 'empty_page_admin_notice' ) );
70
  }
71
  }
72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
73
  /**
74
  * Error notice if wishlist page not set.
75
  */
76
  function empty_page_admin_notice() {
77
- $message = __( 'Link to Wishlists does not work!', 'ti-woocommerce-wishlist' );
78
- $link_message = __( 'Please enter the page wishlist.', 'ti-woocommerce-wishlist' );
79
- printf( '<div class="notice notice-error"><p>%1$s <a href="%2$s">%3$s</a></p></div>', $message, esc_url( $this->admin_url( '' ) . '#general' ), $link_message ); // WPCS: xss ok.
 
 
 
 
 
80
  }
81
 
82
  /**
65
  function define_hooks() {
66
  add_action( 'init', array( $this, 'action_session' ), 1 );
67
  add_action( 'admin_menu', array( $this, 'action_menu' ) );
68
+ if ( 'skip' === filter_input( INPUT_GET, $this->_n . '-wizard' ) ) {
69
+ update_option( $this->_n . '_wizard', true );
70
+ }
71
+ if ( ! get_option( $this->_n . '_wizard' ) ) {
72
+ add_action( 'admin_notices', array( $this, 'wizard_run_admin_notice' ) );
73
+ } elseif ( ! tinv_get_option( 'page', 'wishlist' ) ) {
74
  add_action( 'admin_notices', array( $this, 'empty_page_admin_notice' ) );
75
  }
76
  }
77
 
78
+ /**
79
+ * Error notice if wizard not runed.
80
+ */
81
+ function wizard_run_admin_notice() {
82
+ printf( '<div class="notice notice-error"><p>%1$s</p><p><a href="%2$s" class="button-primary">%3$s</a> <a href="%4$s" class="button-secondary">%5$s</a></p></div>',
83
+ __( '<strong>Welcome to TI WooCommerce Wishlist<strong> – You‘re almost ready to start :)', 'ti-woocommerce-wishlist' ), // @codingStandardsIgnoreLine WordPress.XSS.EscapeOutput.OutputNotEscaped
84
+ esc_url( admin_url( 'index.php?page=tinvwl-wizard' ) ),
85
+ esc_html__( 'Run the Setup Wizard', 'ti-woocommerce-wishlist' ),
86
+ esc_url( admin_url( 'index.php?page=' . $this->_n . '&' . $this->_n . '-wizard=skip' ) ),
87
+ esc_html__( 'Skip Setup', 'ti-woocommerce-wishlist' )
88
+ );
89
+ }
90
+
91
  /**
92
  * Error notice if wishlist page not set.
93
  */
94
  function empty_page_admin_notice() {
95
+ printf( '<div class="notice notice-error is-dismissible" style="position: relative;"><p>%1$s <a href="%2$s">%3$s</a>%4$s<a href="%5$s">%6$s</a></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __( 'Dismiss' ) . '</span></button></div>', // @codingStandardsIgnoreLine WordPress.XSS.EscapeOutput.OutputNotEscaped
96
+ esc_html__( 'Link to Wishlists does not work!', 'ti-woocommerce-wishlist' ),
97
+ esc_url( $this->admin_url( '' ) . '#general' ),
98
+ esc_html__( 'Please apply the Wishlist page', 'ti-woocommerce-wishlist' ),
99
+ esc_html__( ' or ', 'ti-woocommerce-wishlist' ),
100
+ esc_url( admin_url( 'index.php?page=tinvwl-wizard' ) ),
101
+ esc_html__( 'Run the Setup Wizard', 'ti-woocommerce-wishlist' )
102
+ );
103
  }
104
 
105
  /**
includes/activator.class.php CHANGED
@@ -746,5 +746,6 @@ class TInvWL_Activator {
746
  delete_option( sprintf( '%s-%s', self::$_n, $setting ) );
747
  }
748
  delete_option( self::$_n . '_ver' );
 
749
  }
750
  }
746
  delete_option( sprintf( '%s-%s', self::$_n, $setting ) );
747
  }
748
  delete_option( self::$_n . '_ver' );
749
+ delete_option( self::$_n . '_wizard' );
750
  }
751
  }
includes/product.helper.php CHANGED
@@ -135,13 +135,13 @@ class TInvWL_Product {
135
  'variation_id' => 0,
136
  'wishlist_id' => $this->wishlist_id(),
137
  );
138
- $data = filter_var_array( $data, array(
139
  'author' => FILTER_VALIDATE_INT,
140
  'product_id' => FILTER_VALIDATE_INT,
141
  'quantity' => FILTER_VALIDATE_INT,
142
  'variation_id' => FILTER_VALIDATE_INT,
143
  'wishlist_id' => FILTER_VALIDATE_INT,
144
- ) );
145
  $data = array_filter( $data );
146
 
147
  $data = tinv_array_merge( $default, $data );
@@ -160,10 +160,11 @@ class TInvWL_Product {
160
  $data['quantity'] = 1;
161
  }
162
 
163
- $data['product_id'] = $product_data->id;
 
164
  $data['variation_id'] = $product_data->variation_id;
165
  $data['in_stock'] = $product_data->is_in_stock();
166
- $data['price'] = $product_data->price;
167
 
168
  global $wpdb;
169
  if ( $wpdb->insert( $this->table, $data ) ) { // @codingStandardsIgnoreLine WordPress.VIP.DirectDatabaseQuery.DirectQuery
@@ -325,7 +326,7 @@ class TInvWL_Product {
325
  }
326
  $product['data'] = $product_data;
327
  }
328
- $products[ $k ] = $product;
329
  }
330
  return $products;
331
  }
@@ -371,12 +372,12 @@ class TInvWL_Product {
371
  * @return boolean
372
  */
373
  function update( $data = array() ) {
374
- $data = filter_var_array( $data, array(
375
  'product_id' => FILTER_VALIDATE_INT,
376
  'quantity' => FILTER_VALIDATE_INT,
377
  'variation_id' => FILTER_VALIDATE_INT,
378
  'wishlist_id' => FILTER_VALIDATE_INT,
379
- ) );
380
  $data = array_filter( $data );
381
 
382
  if ( ! array_key_exists( 'wishlist_id', $data ) ) {
@@ -397,10 +398,12 @@ class TInvWL_Product {
397
  if ( $product_data->is_sold_individually() ) {
398
  $data['quantity'] = 1;
399
  }
400
- $data['product_id'] = $product_data->id;
 
 
401
  $data['variation_id'] = $product_data->variation_id;
402
  $data['in_stock'] = $product_data->is_in_stock();
403
- $data['price'] = $product_data->price;
404
 
405
  global $wpdb;
406
  return false !== $wpdb->update( $this->table, $data, array(
@@ -434,11 +437,16 @@ class TInvWL_Product {
434
  if ( ! $product_data ) {
435
  return false;
436
  }
437
- return false !== $wpdb->delete( $this->table, array(
438
- 'wishlist_id' => $wishlist_id,
439
- 'product_id' => $product_data->id,
440
- 'variation_id' => $product_data->variation_id,
441
- ) ); // WPCS: db call ok; no-cache ok; unprepared SQL ok.
 
 
 
 
 
442
  }
443
 
444
  /**
@@ -454,7 +462,11 @@ class TInvWL_Product {
454
  }
455
 
456
  global $wpdb;
457
- return false !== $wpdb->delete( $this->table, array( 'product_id' => $product_id ) ); // WPCS: db call ok; no-cache ok; unprepared SQL ok.
 
 
 
 
458
  }
459
 
460
  /**
@@ -470,6 +482,10 @@ class TInvWL_Product {
470
  }
471
 
472
  global $wpdb;
473
- return false !== $wpdb->delete( $this->table, array( 'ID' => $id ) ); // WPCS: db call ok; no-cache ok; unprepared SQL ok.
 
 
 
 
474
  }
475
  }
135
  'variation_id' => 0,
136
  'wishlist_id' => $this->wishlist_id(),
137
  );
138
+ $data = filter_var_array( $data, apply_filters( 'tinvwl_wishlist_product_add_field', array(
139
  'author' => FILTER_VALIDATE_INT,
140
  'product_id' => FILTER_VALIDATE_INT,
141
  'quantity' => FILTER_VALIDATE_INT,
142
  'variation_id' => FILTER_VALIDATE_INT,
143
  'wishlist_id' => FILTER_VALIDATE_INT,
144
+ ) ) );
145
  $data = array_filter( $data );
146
 
147
  $data = tinv_array_merge( $default, $data );
160
  $data['quantity'] = 1;
161
  }
162
 
163
+ $data = apply_filters( 'tinvwl_wishlist_product_add', $data );
164
+ $data['product_id'] = $product_data->id;
165
  $data['variation_id'] = $product_data->variation_id;
166
  $data['in_stock'] = $product_data->is_in_stock();
167
+ $data['price'] = $product_data->price;
168
 
169
  global $wpdb;
170
  if ( $wpdb->insert( $this->table, $data ) ) { // @codingStandardsIgnoreLine WordPress.VIP.DirectDatabaseQuery.DirectQuery
326
  }
327
  $product['data'] = $product_data;
328
  }
329
+ $products[ $k ] = apply_filters( 'tinvwl_wishlist_product_get', $product );
330
  }
331
  return $products;
332
  }
372
  * @return boolean
373
  */
374
  function update( $data = array() ) {
375
+ $data = filter_var_array( $data, apply_filters( 'tinvwl_wishlist_product_update_field', array(
376
  'product_id' => FILTER_VALIDATE_INT,
377
  'quantity' => FILTER_VALIDATE_INT,
378
  'variation_id' => FILTER_VALIDATE_INT,
379
  'wishlist_id' => FILTER_VALIDATE_INT,
380
+ ) ) );
381
  $data = array_filter( $data );
382
 
383
  if ( ! array_key_exists( 'wishlist_id', $data ) ) {
398
  if ( $product_data->is_sold_individually() ) {
399
  $data['quantity'] = 1;
400
  }
401
+
402
+ $data = apply_filters( 'tinvwl_wishlist_product_update', $data );
403
+ $data['product_id'] = $product_data->id;
404
  $data['variation_id'] = $product_data->variation_id;
405
  $data['in_stock'] = $product_data->is_in_stock();
406
+ $data['price'] = $product_data->price;
407
 
408
  global $wpdb;
409
  return false !== $wpdb->update( $this->table, $data, array(
437
  if ( ! $product_data ) {
438
  return false;
439
  }
440
+ $data = array(
441
+ 'wishlist_id' => $wishlist_id,
442
+ 'product_id' => $product_data->id,
443
+ 'variation_id' => $product_data->variation_id,
444
+ );
445
+ $result = false !== $wpdb->delete( $this->table, $data ); // WPCS: db call ok; no-cache ok; unprepared SQL ok.
446
+ if ( $result ) {
447
+ do_action( 'tinvwl_wishlist_product_removed_from_wishlist', $wishlist_id, $product_data->id, $product_data->variation_id );
448
+ }
449
+ return $result;
450
  }
451
 
452
  /**
462
  }
463
 
464
  global $wpdb;
465
+ $result = false !== $wpdb->delete( $this->table, array( 'product_id' => $product_id ) ); // WPCS: db call ok; no-cache ok; unprepared SQL ok.
466
+ if ( $result ) {
467
+ do_action( 'tinvwl_wishlist_product_removed_by_product', $product_id );
468
+ }
469
+ return $result;
470
  }
471
 
472
  /**
482
  }
483
 
484
  global $wpdb;
485
+ $result = false !== $wpdb->delete( $this->table, array( 'ID' => $id ) ); // WPCS: db call ok; no-cache ok; unprepared SQL ok.
486
+ if ( $result ) {
487
+ do_action( 'tinvwl_wishlist_product_removed_by_id', $id );
488
+ }
489
+ return $result;
490
  }
491
  }
includes/product/local.class.php CHANGED
@@ -171,11 +171,11 @@ class TInvWL_Product_Local {
171
  'variation_id' => 0,
172
  );
173
 
174
- $data = filter_var_array( $data, array(
175
  'product_id' => FILTER_VALIDATE_INT,
176
  'quantity' => FILTER_VALIDATE_INT,
177
  'variation_id' => FILTER_VALIDATE_INT,
178
- ) );
179
  $data = array_filter( $data );
180
 
181
  $data = tinv_array_merge( $default, $data );
@@ -194,7 +194,8 @@ class TInvWL_Product_Local {
194
  $data['quantity'] = 1;
195
  }
196
 
197
- $data['product_id'] = $product_data->id;
 
198
  $data['variation_id'] = $product_data->variation_id;
199
 
200
  $this->add_cookies( $data );
@@ -313,7 +314,7 @@ class TInvWL_Product_Local {
313
  }
314
  $product['data'] = $product_data;
315
  }
316
- $products[ $k ] = $product;
317
  }
318
  return $products;
319
  }
@@ -358,11 +359,11 @@ class TInvWL_Product_Local {
358
  * @return boolean
359
  */
360
  function update( $data = array() ) {
361
- $data = filter_var_array( $data, array(
362
  'product_id' => FILTER_VALIDATE_INT,
363
  'quantity' => FILTER_VALIDATE_INT,
364
  'variation_id' => FILTER_VALIDATE_INT,
365
- ) );
366
  $data = array_filter( $data );
367
 
368
  if ( ! array_key_exists( 'variation_id', $data ) ) {
@@ -380,7 +381,9 @@ class TInvWL_Product_Local {
380
  if ( $product_data->is_sold_individually() ) {
381
  $data['quantity'] = 1;
382
  }
383
- $data['product_id'] = $product_data->id;
 
 
384
  $data['variation_id'] = $product_data->variation_id;
385
 
386
  return $this->update_cookies( $data, array( 'product_id' => $data['product_id'], 'variation_id' => $data['variation_id'] ) );
@@ -417,6 +420,7 @@ class TInvWL_Product_Local {
417
 
418
  if ( count( $this->products ) < $c ) {
419
  $this->update_cookie();
 
420
  }
421
  return true;
422
  }
@@ -444,6 +448,7 @@ class TInvWL_Product_Local {
444
 
445
  if ( count( $this->products ) < $c ) {
446
  $this->update_cookie();
 
447
  }
448
  return true;
449
  }
@@ -470,6 +475,7 @@ class TInvWL_Product_Local {
470
 
471
  if ( count( $this->products ) < $c ) {
472
  $this->update_cookie();
 
473
  }
474
  return true;
475
  }
171
  'variation_id' => 0,
172
  );
173
 
174
+ $data = filter_var_array( $data, apply_filters( 'tinvwl_wishlist_product_add_field', array(
175
  'product_id' => FILTER_VALIDATE_INT,
176
  'quantity' => FILTER_VALIDATE_INT,
177
  'variation_id' => FILTER_VALIDATE_INT,
178
+ ) ) );
179
  $data = array_filter( $data );
180
 
181
  $data = tinv_array_merge( $default, $data );
194
  $data['quantity'] = 1;
195
  }
196
 
197
+ $data = apply_filters( 'tinvwl_wishlist_product_add', $data );
198
+ $data['product_id'] = $product_data->id;
199
  $data['variation_id'] = $product_data->variation_id;
200
 
201
  $this->add_cookies( $data );
314
  }
315
  $product['data'] = $product_data;
316
  }
317
+ $products[ $k ] = apply_filters( 'tinvwl_wishlist_product_get', $product );
318
  }
319
  return $products;
320
  }
359
  * @return boolean
360
  */
361
  function update( $data = array() ) {
362
+ $data = filter_var_array( $data, apply_filters( 'tinvwl_wishlist_product_update_field', array(
363
  'product_id' => FILTER_VALIDATE_INT,
364
  'quantity' => FILTER_VALIDATE_INT,
365
  'variation_id' => FILTER_VALIDATE_INT,
366
+ ) ) );
367
  $data = array_filter( $data );
368
 
369
  if ( ! array_key_exists( 'variation_id', $data ) ) {
381
  if ( $product_data->is_sold_individually() ) {
382
  $data['quantity'] = 1;
383
  }
384
+
385
+ $data = apply_filters( 'tinvwl_wishlist_product_update', $data );
386
+ $data['product_id'] = $product_data->id;
387
  $data['variation_id'] = $product_data->variation_id;
388
 
389
  return $this->update_cookies( $data, array( 'product_id' => $data['product_id'], 'variation_id' => $data['variation_id'] ) );
420
 
421
  if ( count( $this->products ) < $c ) {
422
  $this->update_cookie();
423
+ do_action( 'tinvwl_wishlist_product_removed_from_wishlist', $wishlist_id, $product_data->id, $product_data->variation_id );
424
  }
425
  return true;
426
  }
448
 
449
  if ( count( $this->products ) < $c ) {
450
  $this->update_cookie();
451
+ do_action( 'tinvwl_wishlist_product_removed_by_product', $product_id );
452
  }
453
  return true;
454
  }
475
 
476
  if ( count( $this->products ) < $c ) {
477
  $this->update_cookie();
478
+ do_action( 'tinvwl_wishlist_product_removed_by_id', $id );
479
  }
480
  return true;
481
  }
includes/wishlist.class.php CHANGED
@@ -139,6 +139,7 @@ class TInvWL_Wishlist {
139
  );
140
  }
141
  $data = tinv_array_merge( $default, $data );
 
142
  $data['status'] = $this->default_privacy;
143
 
144
  global $wpdb;
@@ -309,7 +310,7 @@ class TInvWL_Wishlist {
309
  $wl['title'] = $this->default_name;
310
  }
311
 
312
- $wls[ $k ] = $wl;
313
  }
314
 
315
  return $wls;
@@ -333,12 +334,13 @@ class TInvWL_Wishlist {
333
  'type' => $type,
334
  );
335
  }
336
- $data = filter_var_array( $data, array(
337
  'title' => FILTER_SANITIZE_STRING,
338
  'status' => FILTER_SANITIZE_STRING,
339
  'type' => FILTER_SANITIZE_STRING,
340
- ) );
341
  $data = array_filter( $data );
 
342
  if ( ! array_key_exists( 'title', $data ) ) {
343
  $wishlist = $this->get_by_id( $id );
344
  if ( 'default' === $wishlist['type'] ) {
@@ -364,6 +366,7 @@ class TInvWL_Wishlist {
364
  global $wpdb;
365
  $result = $wpdb->delete( $this->table, array( 'ID' => $id ) ); // WPCS: db call ok; no-cache ok; unprepared SQL ok.
366
  if ( false !== $result ) {
 
367
  $wlp = new TInvWL_Product();
368
  $wlp->remove_product_from_wl( $id );
369
  return true;
139
  );
140
  }
141
  $data = tinv_array_merge( $default, $data );
142
+ $data = apply_filters( 'tinvwl_wishlist_add', $data );
143
  $data['status'] = $this->default_privacy;
144
 
145
  global $wpdb;
310
  $wl['title'] = $this->default_name;
311
  }
312
 
313
+ $wls[ $k ] = apply_filters( 'tinvwl_wishlist_get', $wl );
314
  }
315
 
316
  return $wls;
334
  'type' => $type,
335
  );
336
  }
337
+ $data = filter_var_array( $data, apply_filters( 'tinvwl_wishlist_fields_update', array(
338
  'title' => FILTER_SANITIZE_STRING,
339
  'status' => FILTER_SANITIZE_STRING,
340
  'type' => FILTER_SANITIZE_STRING,
341
+ ) ) );
342
  $data = array_filter( $data );
343
+ $data = apply_filters( 'tinvwl_wishlist_update', $data, $id );
344
  if ( ! array_key_exists( 'title', $data ) ) {
345
  $wishlist = $this->get_by_id( $id );
346
  if ( 'default' === $wishlist['type'] ) {
366
  global $wpdb;
367
  $result = $wpdb->delete( $this->table, array( 'ID' => $id ) ); // WPCS: db call ok; no-cache ok; unprepared SQL ok.
368
  if ( false !== $result ) {
369
+ do_action( 'tinvwl_wishlist_removed', $id );
370
  $wlp = new TInvWL_Product();
371
  $wlp->remove_product_from_wl( $id );
372
  return true;
includes/wizard.class.php CHANGED
@@ -42,6 +42,7 @@ class TInvWL_Wizard {
42
  if ( apply_filters( $this->_n . '_enable_wizard', true ) ) {
43
  $this->define_hooks();
44
  }
 
45
  }
46
 
47
  /**
42
  if ( apply_filters( $this->_n . '_enable_wizard', true ) ) {
43
  $this->define_hooks();
44
  }
45
+ update_option( $this->_n . '_wizard', true );
46
  }
47
 
48
  /**
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-02-26 22:07+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"
@@ -119,15 +119,15 @@ msgid ""
119
  "will have to do this for each product."
120
  msgstr ""
121
 
122
- #: ../admin/settings/general.class.php:142 ../includes/wizard.class.php:399
123
  msgid "After \"Add to Cart\" button"
124
  msgstr ""
125
 
126
- #: ../admin/settings/general.class.php:143 ../includes/wizard.class.php:400
127
  msgid "Before \"Add to Cart\" button"
128
  msgstr ""
129
 
130
- #: ../admin/settings/general.class.php:144 ../includes/wizard.class.php:401
131
  msgid "Custom position with code"
132
  msgstr ""
133
 
@@ -139,7 +139,7 @@ msgstr ""
139
  msgid "Link"
140
  msgstr ""
141
 
142
- #: ../admin/settings/general.class.php:154 ../includes/wizard.class.php:388
143
  msgid "Button"
144
  msgstr ""
145
 
@@ -625,7 +625,7 @@ msgstr ""
625
  msgid "Accent Buttons Text Hover Color"
626
  msgstr ""
627
 
628
- #: ../admin/settings/upgrade.class.php:34 ../admin/tinvwl.class.php:159
629
  msgid "Upgrade to Pro"
630
  msgstr ""
631
 
@@ -633,12 +633,34 @@ msgstr ""
633
  msgid "Premium Features"
634
  msgstr ""
635
 
636
- #: ../admin/tinvwl.class.php:77
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
637
  msgid "Link to Wishlists does not work!"
638
  msgstr ""
639
 
640
- #: ../admin/tinvwl.class.php:78
641
- msgid "Please enter the page wishlist."
 
 
 
 
642
  msgstr ""
643
 
644
  #: ../includes/form.helper.php:479
@@ -714,48 +736,48 @@ msgstr ""
714
  msgid "read documentation"
715
  msgstr ""
716
 
717
- #: ../includes/wizard.class.php:257
718
  msgid "Introduction"
719
  msgstr ""
720
 
721
- #: ../includes/wizard.class.php:273 ../views/wizard/step-page.php:16
722
  msgid "Page Setup"
723
  msgstr ""
724
 
725
- #: ../includes/wizard.class.php:281 ../includes/wizard.class.php:311
726
  #: ../public/tinvwl.class.php:423
727
  msgid "Wishlist"
728
  msgstr ""
729
 
730
- #: ../includes/wizard.class.php:285
731
  msgid "Create Automatically"
732
  msgstr ""
733
 
734
- #: ../includes/wizard.class.php:286
735
  msgid "Create new Page"
736
  msgstr ""
737
 
738
- #: ../includes/wizard.class.php:426
739
  msgid "Processing"
740
  msgstr ""
741
 
742
- #: ../includes/wizard.class.php:436
743
  msgid "Automatically"
744
  msgstr ""
745
 
746
- #: ../includes/wizard.class.php:437
747
  msgid "Manual"
748
  msgstr ""
749
 
750
- #: ../includes/wizard.class.php:461 ../views/wizard/step-social.php:18
751
  msgid "Share"
752
  msgstr ""
753
 
754
- #: ../includes/wizard.class.php:502
755
  msgid "Ready!"
756
  msgstr ""
757
 
758
- #: ../public/addtowishlist.class.php:172
759
  msgid "Product option is not selected!"
760
  msgstr ""
761
 
3
  msgstr ""
4
  "Project-Id-Version: TI WooCommerce Wishlist\n"
5
  "Report-Msgid-Bugs-To: \n"
6
+ "POT-Creation-Date: 2017-03-02 19:08+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"
119
  "will have to do this for each product."
120
  msgstr ""
121
 
122
+ #: ../admin/settings/general.class.php:142 ../includes/wizard.class.php:400
123
  msgid "After \"Add to Cart\" button"
124
  msgstr ""
125
 
126
+ #: ../admin/settings/general.class.php:143 ../includes/wizard.class.php:401
127
  msgid "Before \"Add to Cart\" button"
128
  msgstr ""
129
 
130
+ #: ../admin/settings/general.class.php:144 ../includes/wizard.class.php:402
131
  msgid "Custom position with code"
132
  msgstr ""
133
 
139
  msgid "Link"
140
  msgstr ""
141
 
142
+ #: ../admin/settings/general.class.php:154 ../includes/wizard.class.php:389
143
  msgid "Button"
144
  msgstr ""
145
 
625
  msgid "Accent Buttons Text Hover Color"
626
  msgstr ""
627
 
628
+ #: ../admin/settings/upgrade.class.php:34 ../admin/tinvwl.class.php:182
629
  msgid "Upgrade to Pro"
630
  msgstr ""
631
 
633
  msgid "Premium Features"
634
  msgstr ""
635
 
636
+ #: ../admin/tinvwl.class.php:83
637
+ msgid ""
638
+ "<strong>Welcome to TI WooCommerce Wishlist<strong> – You‘re almost ready to "
639
+ "start :)"
640
+ msgstr ""
641
+
642
+ #: ../admin/tinvwl.class.php:85 ../admin/tinvwl.class.php:101
643
+ msgid "Run the Setup Wizard"
644
+ msgstr ""
645
+
646
+ #: ../admin/tinvwl.class.php:87
647
+ msgid "Skip Setup"
648
+ msgstr ""
649
+
650
+ #: ../admin/tinvwl.class.php:95
651
+ msgid "Dismiss"
652
+ msgstr ""
653
+
654
+ #: ../admin/tinvwl.class.php:96
655
  msgid "Link to Wishlists does not work!"
656
  msgstr ""
657
 
658
+ #: ../admin/tinvwl.class.php:98
659
+ msgid "Please apply the Wishlist page"
660
+ msgstr ""
661
+
662
+ #: ../admin/tinvwl.class.php:99
663
+ msgid " or "
664
  msgstr ""
665
 
666
  #: ../includes/form.helper.php:479
736
  msgid "read documentation"
737
  msgstr ""
738
 
739
+ #: ../includes/wizard.class.php:258
740
  msgid "Introduction"
741
  msgstr ""
742
 
743
+ #: ../includes/wizard.class.php:274 ../views/wizard/step-page.php:16
744
  msgid "Page Setup"
745
  msgstr ""
746
 
747
+ #: ../includes/wizard.class.php:282 ../includes/wizard.class.php:312
748
  #: ../public/tinvwl.class.php:423
749
  msgid "Wishlist"
750
  msgstr ""
751
 
752
+ #: ../includes/wizard.class.php:286
753
  msgid "Create Automatically"
754
  msgstr ""
755
 
756
+ #: ../includes/wizard.class.php:287
757
  msgid "Create new Page"
758
  msgstr ""
759
 
760
+ #: ../includes/wizard.class.php:427
761
  msgid "Processing"
762
  msgstr ""
763
 
764
+ #: ../includes/wizard.class.php:437
765
  msgid "Automatically"
766
  msgstr ""
767
 
768
+ #: ../includes/wizard.class.php:438
769
  msgid "Manual"
770
  msgstr ""
771
 
772
+ #: ../includes/wizard.class.php:462 ../views/wizard/step-social.php:18
773
  msgid "Share"
774
  msgstr ""
775
 
776
+ #: ../includes/wizard.class.php:503
777
  msgid "Ready!"
778
  msgstr ""
779
 
780
+ #: ../public/addtowishlist.class.php:173
781
  msgid "Product option is not selected!"
782
  msgstr ""
783
 
public/addtowishlist.class.php CHANGED
@@ -126,6 +126,7 @@ class TInvWL_Public_AddToWishlist {
126
  $status = false;
127
  } else {
128
  $post['product_type'] = apply_filters( $this->_n . '_addtowishlist_modify_type', $post['product_type'], $post );
 
129
  switch ( $post['product_type'] ) {
130
  case 'group':
131
  case 'grouped' :
@@ -145,11 +146,11 @@ class TInvWL_Public_AddToWishlist {
145
  if ( $allowed_adding ) {
146
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_already_in' );
147
  $status = false;
148
- } elseif ( $wlp->add_product( array(
149
  'product_id' => $post['product_id'],
150
  'variation_id' => $variation_id,
151
  'quantity' => $quantity,
152
- ) ) ) {
153
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_added_to' );
154
  do_action( $this->_n . '_changed_wishlist', 1, $wishlist, $post['product_id'], $variation_id, $quantity );
155
  } else {
@@ -179,11 +180,11 @@ class TInvWL_Public_AddToWishlist {
179
  if ( $allowed_adding ) {
180
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_already_in' );
181
  $status = false;
182
- } elseif ( $wlp->add_product( array(
183
  'product_id' => $post['product_id'],
184
  'quantity' => $quantity,
185
  'variation_id' => $variation_id,
186
- ) ) ) {
187
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_added_to' );
188
  do_action( $this->_n . '_changed_wishlist', 1, $wishlist, $post['product_id'], $variation_id, $quantity );
189
  } else {
@@ -201,10 +202,10 @@ class TInvWL_Public_AddToWishlist {
201
  if ( $allowed_adding ) {
202
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_already_in' );
203
  $status = false;
204
- } elseif ( $wlp->add_product( array(
205
  'product_id' => $post['product_id'],
206
  'quantity' => $quantity,
207
- ) ) ) {
208
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_added_to' );
209
  do_action( $this->_n . '_changed_wishlist', 1, $wishlist, $post['product_id'], 0, $quantity );
210
  } else {
126
  $status = false;
127
  } else {
128
  $post['product_type'] = apply_filters( $this->_n . '_addtowishlist_modify_type', $post['product_type'], $post );
129
+ $post = apply_filters( 'tinvwl_addtowishlist_prepare', $post );
130
  switch ( $post['product_type'] ) {
131
  case 'group':
132
  case 'grouped' :
146
  if ( $allowed_adding ) {
147
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_already_in' );
148
  $status = false;
149
+ } elseif ( $wlp->add_product( apply_filters( 'tinvwl_addtowishlist_add', array(
150
  'product_id' => $post['product_id'],
151
  'variation_id' => $variation_id,
152
  'quantity' => $quantity,
153
+ ) ) ) ) {
154
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_added_to' );
155
  do_action( $this->_n . '_changed_wishlist', 1, $wishlist, $post['product_id'], $variation_id, $quantity );
156
  } else {
180
  if ( $allowed_adding ) {
181
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_already_in' );
182
  $status = false;
183
+ } elseif ( $wlp->add_product( apply_filters( 'tinvwl_addtowishlist_add', array(
184
  'product_id' => $post['product_id'],
185
  'quantity' => $quantity,
186
  'variation_id' => $variation_id,
187
+ ) ) ) ) {
188
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_added_to' );
189
  do_action( $this->_n . '_changed_wishlist', 1, $wishlist, $post['product_id'], $variation_id, $quantity );
190
  } else {
202
  if ( $allowed_adding ) {
203
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_already_in' );
204
  $status = false;
205
+ } elseif ( $wlp->add_product( apply_filters( 'tinvwl_addtowishlist_add', array(
206
  'product_id' => $post['product_id'],
207
  'quantity' => $quantity,
208
+ ) ) ) ) {
209
  $data['msg'][] = tinv_get_option( 'add_to_wishlist', 'text_added_to' );
210
  do_action( $this->_n . '_changed_wishlist', 1, $wishlist, $post['product_id'], 0, $quantity );
211
  } else {
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://templateinvaders.com/
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.9
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
 
118
  = 1.1.9 =
119
  *Release Date - 26 February 2017*
@@ -121,7 +126,6 @@ There are few ways to install TI WooCommerce Wishlist plugin:
121
  * Fixed an issue with W3 Total Cache compatibility
122
  * Added public functions
123
 
124
-
125
  = 1.1.8 =
126
  *Release Date - 03 February 2017*
127
 
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.10
8
  License: GPLv3
9
  License URI: https://www.gnu.org/licenses/gpl-3.0.html
10
 
114
 
115
  == Changelog ==
116
 
117
+ = 1.1.10 =
118
+ *Release Date - 02 March 2017*
119
+
120
+ * The Setup Wizard enhancements
121
+ * Added new hooks for wishlist create|update|delete and wishlist product add|update|remove events
122
 
123
  = 1.1.9 =
124
  *Release Date - 26 February 2017*
126
  * Fixed an issue with W3 Total Cache compatibility
127
  * Added public functions
128
 
 
129
  = 1.1.8 =
130
  *Release Date - 03 February 2017*
131
 
ti-woocommerce-wishlist.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: TI WooCommerce Wishlist
5
  * Plugin URI: https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpress-plugin/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
- * Version: 1.1.9
8
  * Author: Template Invaders
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.9' );
41
  }
42
 
43
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {
4
  * Plugin Name: TI WooCommerce Wishlist
5
  * Plugin URI: https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpress-plugin/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
+ * Version: 1.1.10
8
  * Author: Template Invaders
9
  * Author URI: https://templateinvaders.com/
10
  * License: GPL-2.0+
37
  }
38
 
39
  if ( ! defined( 'TINVWL_FVERSION' ) ) {
40
+ define( 'TINVWL_FVERSION', '1.1.10' );
41
  }
42
 
43
  if ( ! defined( 'TINVWL_LOAD_FREE' ) ) {