WooCommerce Wishlist Plugin - Version 1.25.0

Version Description

Release Date - 30 March 2021

  • WooCommerce 5.2 support
  • Added opt-in options for the support chat
  • Updated integration with AutomateWoo plugin
  • Updated integration with WooCommerce TM Extra Product Options plugin
  • Fixed extra JavaScript alert on wishlist table bulk events
Download this release

Release Info

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

Code changes from version 1.24.5 to 1.25.0

admin/settings/general.class.php CHANGED
@@ -8,7 +8,7 @@
8
  */
9
 
10
  // If this file is called directly, abort.
11
- if ( ! defined('ABSPATH')) {
12
  die;
13
  }
14
 
@@ -56,7 +56,7 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
56
  */
57
  function __construct($plugin_name, $version)
58
  {
59
- $this->_name = $plugin_name;
60
  $this->_version = $version;
61
  parent::__construct($plugin_name, $version);
62
  add_action('tinvwl_section_before', array($this, 'premium_features'), 9);
@@ -70,9 +70,9 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
70
  function menu()
71
  {
72
  return array(
73
- 'title' => __('General Settings', 'ti-woocommerce-wishlist'),
74
- 'method' => array($this, '_print_'),
75
- 'slug' => '',
76
  'capability' => 'tinvwl_general_settings',
77
  );
78
  }
@@ -84,10 +84,10 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
84
  */
85
  public function get_wp_menus()
86
  {
87
- $menus = array('' => __('None', 'ti-woocommerce-wishlist'));
88
  $get_menus = get_terms('nav_menu', array('hide_empty' => true));
89
  foreach ($get_menus as $menu) {
90
- $menus[ $menu->term_id ] = $menu->name;
91
  }
92
 
93
  return $menus;
@@ -100,83 +100,83 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
100
  */
101
  function constructor_data()
102
  {
103
- $lists = get_pages(array('number' => 9999999)); // @codingStandardsIgnoreLine WordPress.VIP.RestrictedFunctions.get_pages
104
  $page_list = array('' => '');
105
- $menus = $this->get_wp_menus();
106
  foreach ($lists as $list) {
107
- $page_list[ $list->ID ] = $list->post_title;
108
  }
109
 
110
  $settings = array(
111
  array(
112
- 'id' => 'general',
113
- 'title' => __('General Settings', 'ti-woocommerce-wishlist'),
114
- 'desc' => __('Wishlist page needs to be selected so the plugin knows where it is. This page should be created upon installation of the plugin, if not you will need to create it manually.', 'ti-woocommerce-wishlist'),
115
  'show_names' => true,
116
- 'fields' => array(
117
  array(
118
  'type' => 'text',
119
  'name' => 'default_title',
120
  'text' => __('Default Wishlist Name', 'ti-woocommerce-wishlist'),
121
- 'std' => 'Default wishlist',
122
  ),
123
  array(
124
- 'type' => 'select',
125
- 'name' => 'page_wishlist',
126
- 'text' => __('Wishlist Page', 'ti-woocommerce-wishlist'),
127
- 'std' => '',
128
- 'options' => $page_list,
129
  'validate' => FILTER_VALIDATE_INT,
130
  ),
131
  array(
132
- 'type' => 'checkboxonoff',
133
- 'name' => 'require_login',
134
- 'text' => __('Require Login', 'ti-woocommerce-wishlist'),
135
- 'desc' => __('Disallows guests to use Wishlist functionality until they sign-in.', 'ti-woocommerce-wishlist'),
136
- 'std' => false,
137
  'extra' => array(
138
  'tiwl-show' => '.tiwl-general-redirect-require-login',
139
  ),
140
  ),
141
  array(
142
- 'type' => 'checkboxonoff',
143
- 'name' => 'redirect_require_login',
144
- 'text' => __('Redirect to Login Page', 'ti-woocommerce-wishlist'),
145
- 'desc' => '<span class="tiwl-button-show-notice-warning-popup"><strong>' . __('Currently this option could not be changed because "Show successful notice in popup" is disabled. Guests will be redirected automatically to a login page.', 'ti-woocommerce-wishlist') . '</strong></span><span class="tiwl-button-show-notice">' . __('If enabled, guests will be redirected to a login page once clicking the "Add to Wishlist" button or "Wishlist Products Counter" link. Otherwise a popup with login required notice will appear.', 'ti-woocommerce-wishlist') . '</span>',
146
- 'std' => false,
147
  'class' => 'tiwl-general-redirect-require-login',
148
  ),
149
  array(
150
  'type' => 'checkboxonoff',
151
  'name' => 'link_in_myaccount',
152
  'text' => __('Show Link to Wishlist in my account', 'ti-woocommerce-wishlist'),
153
- 'std' => true,
154
  ),
155
  array(
156
- 'type' => 'checkboxonoff',
157
- 'name' => 'processing_autoremove',
158
- 'text' => __('Remove Product from Wishlist if added to cart', 'ti-woocommerce-wishlist'),
159
- 'std' => true,
160
  'extra' => array('tiwl-show' => '.tiwl-processing-autoremove-anyone'),
161
  ),
162
  array(
163
  'type' => 'checkboxonoff',
164
  'name' => 'processing_redirect_checkout',
165
  'text' => __('Redirect to the checkout page from Wishlist if added to cart', 'ti-woocommerce-wishlist'),
166
- 'std' => false,
167
  ),
168
  array(
169
- 'type' => 'checkboxonoff',
170
- 'name' => 'processing_autoremove_anyone',
171
- 'text' => __('Remove by anyone', 'ti-woocommerce-wishlist'),
172
- 'std' => false,
173
  'class' => 'tiwl-processing-autoremove-anyone',
174
  ),
175
  array(
176
- 'type' => 'checkboxonoff',
177
- 'name' => 'simple_flow',
178
- 'text' => __('Remove product from Wishlist on second click', 'ti-woocommerce-wishlist'),
179
- 'std' => false,
180
  'extra' => array(
181
  'tiwl-show' => '.tiwl-general-simple-flow>td, .tiwl-button-simple-flow',
182
  'tiwl-hide' => '.tiwl-general-simple-flow-hide>td',
@@ -184,223 +184,223 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
184
  ),
185
  array(
186
  'type' => 'group',
187
- 'id' => 'show_notice',
188
  ),
189
  array(
190
- 'type' => 'checkboxonoff',
191
- 'name' => 'show_notice',
192
- 'text' => __('Show successful notice in popup', 'ti-woocommerce-wishlist'),
193
- 'desc' => __('This option allows to show/hide a popup with successful or error notices after addition or removing products from a Wishlist.', 'ti-woocommerce-wishlist'),
194
- 'std' => true,
195
  'extra' => array(
196
  'tiwl-show' => '.tiwl-button-show-notice',
197
  'tiwl-hide' => '.tiwl-button-show-notice-warning-popup',
198
  ),
199
  ),
200
  array(
201
- 'type' => 'text',
202
- 'name' => 'text_browse',
203
- 'text' => __('"View Wishlist" button Text', 'ti-woocommerce-wishlist'),
204
- 'std' => 'View Wishlist',
205
  'class' => 'tiwl-button-show-notice',
206
  ),
207
  array(
208
- 'type' => 'checkboxonoff',
209
- 'name' => 'redirect',
210
- 'text' => __('Redirect to Wishlist', 'ti-woocommerce-wishlist'),
211
- 'desc' => __('If enabled, user will be redirected to wishlist page after 5 sec from adding product to wishlist.', 'ti-woocommerce-wishlist'),
212
- 'std' => true,
213
  'class' => 'tiwl-button-show-notice',
214
  ),
215
  array(
216
- 'type' => 'text',
217
- 'name' => 'text_added_to',
218
- 'text' => __('"Product added to Wishlist" Text', 'ti-woocommerce-wishlist'),
219
- 'std' => '{product_name} added to Wishlist',
220
- 'desc' => __('You can use next placeholder in this field to get current product name: <code>{product_name}</code>, <code>{product_sku}</code>', 'ti-woocommerce-wishlist'),
221
  'class' => 'tiwl-button-show-notice',
222
  ),
223
  array(
224
- 'type' => 'text',
225
- 'name' => 'text_already_in',
226
- 'text' => __('"Product already in Wishlist" Text', 'ti-woocommerce-wishlist'),
227
- 'desc' => __('This notification will be shown if user will try to add a product that is already in the wishlist. ', 'ti-woocommerce-wishlist') . __('You can use next placeholder in this field to get current product name: <code>{product_name}</code>, <code>{product_sku}</code>', 'ti-woocommerce-wishlist'),
228
- 'std' => '{product_name} already in Wishlist',
229
  'class' => 'tiwl-button-show-notice tiwl-general-simple-flow-hide',
230
  ),
231
  array(
232
- 'type' => 'text',
233
- 'name' => 'text_removed_from',
234
- 'text' => __('"Product removed from Wishlist" Text', 'ti-woocommerce-wishlist'),
235
- 'desc' => __('This notification will be shown once the product is removed from Wishlist on a single or a catalog page.', 'ti-woocommerce-wishlist'),
236
- 'std' => 'Product removed from Wishlist',
237
  'class' => 'tiwl-button-show-notice tiwl-general-simple-flow',
238
  ),
239
  ),
240
  ),
241
  array(
242
- 'id' => 'permalinks',
243
- 'title' => __('Permalinks Settings', 'ti-woocommerce-wishlist'),
244
  'show_names' => false,
245
- 'fields' => array(
246
  array(
247
  'type' => 'checkboxonoff',
248
  'name' => 'force',
249
  'text' => __('Force permalinks rewrite', 'ti-woocommerce-wishlist'),
250
  'desc' => __('This option should be enabled to avoid any issues with URL rewrites between other plugins and Wishlist', 'ti-woocommerce-wishlist'),
251
- 'std' => false,
252
  ),
253
  ),
254
  ),
255
  array(
256
- 'id' => 'page',
257
- 'title' => __('Wishlist Page Options', 'ti-woocommerce-wishlist'),
258
- 'desc' => __('Coming soon', 'ti-woocommerce-wishlist'),
259
  'show_names' => true,
260
- 'style' => 'display:none;',
261
- 'fields' => array(
262
- array(
263
- 'type' => 'select',
264
- 'name' => 'wishlist',
265
- 'text' => __('My Wishlist', 'ti-woocommerce-wishlist'),
266
- 'std' => '',
267
- 'options' => $page_list,
268
  'validate' => FILTER_VALIDATE_INT,
269
  ),
270
  ),
271
  ),
272
  array(
273
- 'id' => 'processing',
274
- 'title' => __('Wishlist Processing Options', 'ti-woocommerce-wishlist'),
275
- 'desc' => __('Coming soon', 'ti-woocommerce-wishlist'),
276
- 'style' => 'display:none;',
277
  'show_names' => true,
278
- 'fields' => array(
279
  array(
280
- 'type' => 'checkboxonoff',
281
- 'name' => 'autoremove',
282
- 'text' => __('Automatic removal', 'ti-woocommerce-wishlist'),
283
- 'std' => true,
284
  'extra' => array('tiwl-show' => '.tiwl-processing-autoremove'),
285
  ),
286
  array(
287
- 'type' => 'select',
288
- 'name' => 'autoremove_status',
289
- 'text' => __('Remove condition', 'ti-woocommerce-wishlist'),
290
- 'std' => 'tinvwl-addcart',
291
  'options' => array(
292
  'tinvwl-addcart' => __('Add to Cart', 'ti-woocommerce-wishlist'),
293
  ),
294
- 'class' => 'tiwl-processing-autoremove',
295
  ),
296
  array(
297
- 'type' => 'checkboxonoff',
298
- 'name' => 'redirect_checkout',
299
- 'text' => __('Redirect to the checkout page from Wishlist if added to cart', 'ti-woocommerce-wishlist'),
300
- 'std' => false,
301
  'class' => 'tiwl-processing-redirect-checkout',
302
  ),
303
  array(
304
- 'type' => 'checkboxonoff',
305
- 'name' => 'autoremove_anyone',
306
- 'text' => __('Remove by anyone', 'ti-woocommerce-wishlist'),
307
- 'std' => false,
308
  'class' => 'tiwl-processing-autoremove',
309
  ),
310
  ),
311
  ),
312
  array(
313
- 'id' => 'add_to_wishlist',
314
- 'title' => __('Product page "Add to Wishlist" Button Settings', 'ti-woocommerce-wishlist'),
315
  'show_names' => true,
316
- 'fields' => array(
317
  array(
318
- 'type' => 'select',
319
- 'name' => 'position',
320
- 'text' => __('Button position', 'ti-woocommerce-wishlist'),
321
- 'desc' => __('Add this shortcode <code>[ti_wishlists_addtowishlist]</code> anywhere on product page, if you have chosen custom position for product button. You will have to do this for each product.', 'ti-woocommerce-wishlist'),
322
- 'std' => 'after',
323
  'options' => array(
324
- 'after' => __('After "Add to Cart" button', 'ti-woocommerce-wishlist'),
325
- 'before' => __('Before "Add to Cart" button', 'ti-woocommerce-wishlist'),
326
  'thumbnails' => __('After Thumbnails', 'ti-woocommerce-wishlist'),
327
- 'summary' => __('After summary', 'ti-woocommerce-wishlist'),
328
- 'shortcode' => __('Custom position with code', 'ti-woocommerce-wishlist'),
329
  ),
330
  ),
331
  array(
332
- 'type' => 'text',
333
- 'name' => 'class',
334
- 'text' => __('Button custom CSS class', 'ti-woocommerce-wishlist'),
335
- 'desc' => __('You can add custom CSS classes to button markup separated by spaces. Most of themes using <code>button</code> class for this type of buttons.', 'ti-woocommerce-wishlist'),
336
- 'std' => '',
337
  'extra' => array(
338
  'placeholder' => 'button btn-primary',
339
  ),
340
  ),
341
  array(
342
- 'type' => 'select',
343
- 'name' => 'icon',
344
- 'text' => __('"Add to Wishlist" Icon', 'ti-woocommerce-wishlist'),
345
- 'desc' => __('You can choose from our predefined icons or upload your custom icon. Custom icon size is limited to 16x16 px.', 'ti-woocommerce-wishlist'),
346
- 'std' => 'heart',
347
  'options' => array(
348
- '' => __('None', 'ti-woocommerce-wishlist'),
349
- 'heart' => __('Heart', 'ti-woocommerce-wishlist'),
350
  'heart-plus' => __('Heart+', 'ti-woocommerce-wishlist'),
351
- 'custom' => __('Custom', 'ti-woocommerce-wishlist'),
352
  ),
353
- 'extra' => array(
354
- 'class' => 'tiwl-button-icon',
355
- 'tiwl-show' => '.tiwl-button-icon-custom',
356
- 'tiwl-hide' => '.tiwl-button-icon-style',
357
  'tiwl-value' => 'custom',
358
  ),
359
  ),
360
  array(
361
- 'type' => 'uploadfile',
362
- 'name' => 'icon_upload',
363
- 'std' => '',
364
- 'text' => ' ',
365
  'class' => 'tiwl-button-icon-custom',
366
  'extra' => array(
367
  'button' => array(
368
  'value' => __('Upload', 'ti-woocommerce-wishlist'),
369
  ),
370
- 'type' => array('image'),
371
  ),
372
  ),
373
  array(
374
- 'type' => 'select',
375
- 'name' => 'icon_style',
376
- 'std' => '',
377
- 'text' => __('"Add to Wishlist" Icon Color', 'ti-woocommerce-wishlist'),
378
  'options' => array(
379
- '' => __('Use font color', 'ti-woocommerce-wishlist'),
380
  'black' => __('Black', 'ti-woocommerce-wishlist'),
381
  'white' => __('White', 'ti-woocommerce-wishlist'),
382
  ),
383
- 'class' => 'tiwl-button-icon-style',
384
  ),
385
  array(
386
  'type' => 'checkboxonoff',
387
  'name' => 'show_preloader',
388
  'text' => __('Show preloader', 'ti-woocommerce-wishlist'),
389
  'desc' => __('If enabled, applies animation for the button icon until product adding or removing processed. (Usable for servers with slow connection mostly.)', 'ti-woocommerce-wishlist'),
390
- 'std' => false,
391
  ),
392
  array(
393
- 'type' => 'checkboxonoff',
394
- 'name' => 'show_text',
395
- 'text' => __('Show button text', 'ti-woocommerce-wishlist'),
396
- 'std' => true,
397
  'extra' => array(
398
  'tiwl-show' => '.tiwl-button-text',
399
  ),
400
  ),
401
  array(
402
- 'type' => 'group',
403
- 'id' => 'show_text_single',
404
  'class' => 'tiwl-button-text',
405
  'style' => 'border-top: 0px; padding-top: 0px;',
406
  ),
@@ -408,139 +408,139 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
408
  'type' => 'text',
409
  'name' => 'text',
410
  'text' => __('"Add to Wishlist" button Text', 'ti-woocommerce-wishlist'),
411
- 'std' => 'Add to Wishlist',
412
  ),
413
  array(
414
- 'type' => 'checkboxonoff',
415
- 'name' => 'already_on',
416
- 'text' => __('Show "Already In Wishlist" button Text', 'ti-woocommerce-wishlist'),
417
- 'std' => false,
418
  'extra' => array(
419
  'tiwl-show' => '.tiwl-button-already-on',
420
  ),
421
  'class' => 'tiwl-general-simple-flow-hide',
422
  ),
423
  array(
424
- 'type' => 'text',
425
- 'name' => 'text_already_on',
426
- 'text' => __('"Already In Wishlist" button Text', 'ti-woocommerce-wishlist'),
427
- 'std' => 'Already In Wishlist',
428
  'class' => 'tiwl-button-already-on tiwl-general-simple-flow-hide',
429
  ),
430
  array(
431
- 'type' => 'text',
432
- 'name' => 'text_remove',
433
- 'text' => __('"Remove from Wishlist" Button Text', 'ti-woocommerce-wishlist'),
434
- 'std' => 'Remove from Wishlist',
435
  'class' => 'tiwl-button-simple-flow',
436
  ),
437
  ),
438
  ),
439
  array(
440
- 'id' => 'add_to_wishlist_catalog',
441
- 'title' => __('Product listing Button Settings', 'ti-woocommerce-wishlist'),
442
- 'desc' => __('These are separate settings for the "Add to Wishlist" button on a product listing (Shop page, categories, etc.). You can also adjust button and text colors, size, etc. in a <code>TI Wishlist > Style Options.</code>', 'ti-woocommerce-wishlist'),
443
  'show_names' => true,
444
- 'fields' => array(
445
  array(
446
- 'type' => 'checkboxonoff',
447
- 'name' => 'show_in_loop',
448
- 'text' => __('Show in Product Listing', 'ti-woocommerce-wishlist'),
449
- 'std' => true,
450
  'extra' => array(
451
  'tiwl-show' => '.tiwl-buttoncat-button',
452
  ),
453
  ),
454
  array(
455
- 'type' => 'group',
456
- 'id' => 'add_to_wishlist_catalog',
457
  'class' => 'tiwl-buttoncat-button',
458
  'style' => 'border-top: 0px; padding-top: 0px;',
459
  ),
460
  array(
461
- 'type' => 'select',
462
- 'name' => 'position',
463
- 'text' => __('Button position', 'ti-woocommerce-wishlist'),
464
- 'std' => 'after',
465
  'options' => array(
466
- 'after' => __('After "Add to Cart" button', 'ti-woocommerce-wishlist'),
467
- 'before' => __('Before "Add to Cart" button', 'ti-woocommerce-wishlist'),
468
  'above_thumb' => __('Above Thumbnail', 'ti-woocommerce-wishlist'),
469
- 'shortcode' => __('Custom position with code', 'ti-woocommerce-wishlist'),
470
  ),
471
- 'desc' => __('Note: if "Custom position with code" option is applied, the "Add to Wishlist" button should be added into template using <code>do_shortcode()</code> function like this:<br /><code>do_shortcode("[ti_wishlists_addtowishlist loop=yes]")</code>', 'ti-woocommerce-wishlist'),
472
  ),
473
  array(
474
- 'type' => 'text',
475
- 'name' => 'class',
476
- 'text' => __('Button custom CSS class', 'ti-woocommerce-wishlist'),
477
- 'desc' => __('You can add custom CSS classes to button markup separated by spaces. Most of themes using <code>button</code> class for this type of buttons.', 'ti-woocommerce-wishlist'),
478
- 'std' => '',
479
  'extra' => array(
480
  'placeholder' => 'button btn-primary',
481
  ),
482
  ),
483
  array(
484
- 'type' => 'select',
485
- 'name' => 'icon',
486
- 'text' => __('"Add to Wishlist" Icon', 'ti-woocommerce-wishlist'),
487
- 'std' => 'heart',
488
  'options' => array(
489
- '' => __('None', 'ti-woocommerce-wishlist'),
490
- 'heart' => __('Heart', 'ti-woocommerce-wishlist'),
491
  'heart-plus' => __('Heart+', 'ti-woocommerce-wishlist'),
492
- 'custom' => __('Custom', 'ti-woocommerce-wishlist'),
493
  ),
494
- 'extra' => array(
495
- 'tiwl-show' => '.tiwl-buttoncat-icon-custom',
496
- 'tiwl-hide' => '.tiwl-buttoncat-icon-style',
497
  'tiwl-value' => 'custom',
498
  ),
499
  ),
500
  array(
501
- 'type' => 'uploadfile',
502
- 'name' => 'icon_upload',
503
- 'std' => '',
504
- 'text' => ' ',
505
  'class' => 'tiwl-buttoncat-icon-custom',
506
  'extra' => array(
507
  'button' => array(
508
  'value' => __('Upload', 'ti-woocommerce-wishlist'),
509
  ),
510
- 'type' => array('image'),
511
  ),
512
  ),
513
  array(
514
- 'type' => 'select',
515
- 'name' => 'icon_style',
516
- 'std' => '',
517
- 'text' => __('"Add to Wishlist" Icon Color', 'ti-woocommerce-wishlist'),
518
  'options' => array(
519
- '' => __('Use font color', 'ti-woocommerce-wishlist'),
520
  'black' => __('Black', 'ti-woocommerce-wishlist'),
521
  'white' => __('White', 'ti-woocommerce-wishlist'),
522
  ),
523
- 'class' => 'tiwl-buttoncat-icon-style',
524
  ),
525
  array(
526
  'type' => 'checkboxonoff',
527
  'name' => 'show_preloader',
528
  'text' => __('Show preloader', 'ti-woocommerce-wishlist'),
529
  'desc' => __('If enabled, applies animation for the button icon until product adding or removing processed. (Usable for servers with slow connection mostly.)', 'ti-woocommerce-wishlist'),
530
- 'std' => false,
531
  ),
532
  array(
533
- 'type' => 'checkboxonoff',
534
- 'name' => 'show_text',
535
- 'text' => __('Show button text', 'ti-woocommerce-wishlist'),
536
- 'std' => true,
537
  'extra' => array(
538
  'tiwl-show' => '.tiwl-button-text-catalog',
539
  ),
540
  ),
541
  array(
542
- 'type' => 'group',
543
- 'id' => 'show_text_single',
544
  'class' => 'tiwl-button-text-catalog',
545
  'style' => 'border-top: 0px; padding-top: 0px;',
546
  ),
@@ -548,90 +548,90 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
548
  'type' => 'text',
549
  'name' => 'text',
550
  'text' => __('"Add to Wishlist" Text', 'ti-woocommerce-wishlist'),
551
- 'std' => 'Add to Wishlist',
552
  ),
553
  array(
554
- 'type' => 'checkboxonoff',
555
- 'name' => 'already_on',
556
- 'text' => __('Show "Already In Wishlist" button Text', 'ti-woocommerce-wishlist'),
557
- 'std' => false,
558
  'extra' => array(
559
  'tiwl-show' => '.tiwl-button-already-on-catalog',
560
  ),
561
  'class' => 'tiwl-general-simple-flow-hide',
562
  ),
563
  array(
564
- 'type' => 'text',
565
- 'name' => 'text_already_on',
566
- 'text' => __('"Already In Wishlist" button Text', 'ti-woocommerce-wishlist'),
567
- 'std' => 'Already In Wishlist',
568
  'class' => 'tiwl-button-already-on-catalog tiwl-general-simple-flow-hide',
569
  ),
570
  array(
571
- 'type' => 'text',
572
- 'name' => 'text_remove',
573
- 'text' => __('"Remove from Wishlist" Button Text', 'ti-woocommerce-wishlist'),
574
- 'std' => 'Remove from Wishlist',
575
  'class' => 'tiwl-button-simple-flow',
576
  ),
577
  ),
578
  ),
579
  array(
580
- 'id' => 'product_table',
581
- 'title' => __('Wishlist Product Settings', 'ti-woocommerce-wishlist'),
582
- 'desc' => __('Following options allows you to choose what information/functionality to show/enable in wishlist table on wishlist page.', 'ti-woocommerce-wishlist'),
583
  'show_names' => true,
584
- 'fields' => array(
585
  array(
586
- 'type' => 'checkboxonoff',
587
- 'name' => 'add_to_cart',
588
- 'text' => __('Show "Add to Cart" button', 'ti-woocommerce-wishlist'),
589
- 'std' => true,
590
  'extra' => array('tiwl-show' => '.tiwl-table-action-addcart'),
591
  ),
592
  array(
593
- 'type' => 'text',
594
- 'name' => 'text_add_to_cart',
595
- 'text' => __('"Add to Cart" Text', 'ti-woocommerce-wishlist'),
596
- 'std' => 'Add to Cart',
597
  'class' => 'tiwl-table-action-addcart',
598
  ),
599
  array(
600
  'type' => 'checkboxonoff',
601
  'name' => 'colm_price',
602
  'text' => __('Show Unit price', 'ti-woocommerce-wishlist'),
603
- 'std' => true,
604
  ),
605
  array(
606
  'type' => 'checkboxonoff',
607
  'name' => 'colm_stock',
608
  'text' => __('Show Stock status', 'ti-woocommerce-wishlist'),
609
- 'std' => true,
610
  ),
611
  array(
612
  'type' => 'checkboxonoff',
613
  'name' => 'colm_date',
614
  'text' => __('Show Date of addition', 'ti-woocommerce-wishlist'),
615
- 'std' => true,
616
  ),
617
  ),
618
  ),
619
  array(
620
- 'id' => 'table',
621
- 'title' => __('Wishlist Table Settings', 'ti-woocommerce-wishlist'),
622
- 'desc' => __('Following options will help user to manage and add products to cart from wishlist table in bulk.', 'ti-woocommerce-wishlist'),
623
  'show_names' => true,
624
- 'fields' => array(
625
  array(
626
- 'type' => 'checkboxonoff',
627
- 'name' => 'colm_checkbox',
628
- 'text' => __('Show Checkboxes', 'ti-woocommerce-wishlist'),
629
- 'std' => true,
630
  'extra' => array('tiwl-show' => '.tiwl-table-cb-button'),
631
  ),
632
  array(
633
- 'type' => 'group',
634
- 'id' => 'cb_button',
635
  'class' => 'tiwl-table-cb-button',
636
  ),
637
  array(
@@ -639,108 +639,108 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
639
  'name' => 'colm_actions',
640
  'text' => __('Show Actions button', 'ti-woocommerce-wishlist'),
641
  'desc' => __('Bulk actions drop down at the bottom of wishlist table', 'ti-woocommerce-wishlist'),
642
- 'std' => true,
643
  ),
644
  array(
645
- 'type' => 'checkboxonoff',
646
- 'name' => 'add_select_to_cart',
647
- 'text' => __('Show "Add Selected to Cart" button', 'ti-woocommerce-wishlist'),
648
- 'std' => true,
649
  'extra' => array('tiwl-show' => '.tiwl-table-addcart-sel'),
650
  ),
651
  array(
652
- 'type' => 'text',
653
- 'name' => 'text_add_select_to_cart',
654
- 'text' => __('"Add Selected to Cart" Button Text', 'ti-woocommerce-wishlist'),
655
- 'std' => 'Add Selected to Cart',
656
  'class' => 'tiwl-table-addcart-sel',
657
  ),
658
  array(
659
  'type' => 'group',
660
- 'id' => '_button',
661
  ),
662
  array(
663
- 'type' => 'checkboxonoff',
664
- 'name' => 'add_all_to_cart',
665
- 'text' => __('Show "Add All to Cart" button', 'ti-woocommerce-wishlist'),
666
- 'std' => true,
667
  'extra' => array('tiwl-show' => '.tiwl-table-addcart-all'),
668
  ),
669
  array(
670
- 'type' => 'text',
671
- 'name' => 'text_add_all_to_cart',
672
- 'text' => __('"Add All to Cart" Button Text', 'ti-woocommerce-wishlist'),
673
- 'std' => 'Add All to Cart',
674
  'class' => 'tiwl-table-addcart-all',
675
  ),
676
  ),
677
  ),
678
  array(
679
- 'id' => 'social',
680
  'show_names' => true,
681
- 'fields' => array(
682
  array(
683
- 'type' => 'group',
684
- 'id' => 'social',
685
- 'desc' => __('Following options enable/disable Social share icons below wishlist table on wishlist page. Wishlist owner can easily share their wishlists using this button on social networks. Wishlist privacy should be set to public or shared status, private wishlists can\'t be shared.', 'ti-woocommerce-wishlist'),
686
  'class' => 'tinvwl-info-top',
687
  ),
688
  array(
689
- 'type' => 'html',
690
- 'name' => 'social',
691
- 'text' => __('Social Networks Sharing Options', 'ti-woocommerce-wishlist'),
692
  'class' => 'tinvwl-header-row tinvwl-line-border',
693
  ),
694
  array(
695
  'type' => 'checkboxonoff',
696
  'name' => 'facebook',
697
  'text' => __('Show "Facebook" Button', 'ti-woocommerce-wishlist'),
698
- 'std' => true,
699
  ),
700
  array(
701
  'type' => 'checkboxonoff',
702
  'name' => 'twitter',
703
  'text' => __('Show "Twitter" Button', 'ti-woocommerce-wishlist'),
704
- 'std' => true,
705
  ),
706
  array(
707
  'type' => 'checkboxonoff',
708
  'name' => 'pinterest',
709
  'text' => __('Show "Pinterest" Button', 'ti-woocommerce-wishlist'),
710
- 'std' => true,
711
  ),
712
  array(
713
  'type' => 'checkboxonoff',
714
  'name' => 'whatsapp',
715
  'text' => __('Show "WhatsApp" Button', 'ti-woocommerce-wishlist'),
716
- 'std' => true,
717
  ),
718
  array(
719
  'type' => 'checkboxonoff',
720
  'name' => 'clipboard',
721
  'text' => __('Show "Copy to clipboard" Button', 'ti-woocommerce-wishlist'),
722
- 'std' => true,
723
  ),
724
  array(
725
  'type' => 'checkboxonoff',
726
  'name' => 'email',
727
  'text' => __('Show "Share by Email" Button', 'ti-woocommerce-wishlist'),
728
- 'std' => true,
729
  ),
730
  array(
731
  'type' => 'text',
732
  'name' => 'share_on',
733
  'text' => __('"Share on" Text', 'ti-woocommerce-wishlist'),
734
- 'std' => 'Share on',
735
  ),
736
  array(
737
- 'type' => 'select',
738
- 'name' => 'icon_style',
739
- 'text' => __('Social Icons Color', 'ti-woocommerce-wishlist'),
740
- 'std' => '',
741
- 'options' => array(
742
- '' => __('Use font color', 'ti-woocommerce-wishlist'),
743
- 'dark' => __('Dark', 'ti-woocommerce-wishlist'),
744
  'white' => __('White', 'ti-woocommerce-wishlist'),
745
  ),
746
  'validate' => FILTER_DEFAULT,
@@ -748,153 +748,153 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
748
  ),
749
  ),
750
  array(
751
- 'id' => 'topline',
752
- 'title' => __('Wishlist Product Counter', 'ti-woocommerce-wishlist'),
753
- 'desc' => sprintf(__('Add this shortcode <code>[ti_wishlist_products_counter]</code> anywhere into a page content to show Wishlist Counter.<br/><br/>It can be also added as a widget <code>Wishlist Products Counter</code> under the <a href="%s">Appearance -> Widgets</a> section.', 'ti-woocommerce-wishlist'), esc_url(admin_url('widgets.php'))),
754
  'show_names' => true,
755
- 'fields' => array(
756
  array(
757
- 'type' => 'select',
758
- 'name' => 'icon',
759
- 'text' => __('"Wishlist" Counter Icon', 'ti-woocommerce-wishlist'),
760
- 'std' => 'heart',
761
  'options' => array(
762
- '' => __('None', 'ti-woocommerce-wishlist'),
763
- 'heart' => __('Heart', 'ti-woocommerce-wishlist'),
764
  'heart-plus' => __('Heart+', 'ti-woocommerce-wishlist'),
765
- 'custom' => __('Custom', 'ti-woocommerce-wishlist'),
766
  ),
767
- 'desc' => __('You can choose from our predefined icons or upload your custom icon. Custom icon size is limited to 16x16 px.', 'ti-woocommerce-wishlist'),
768
- 'extra' => array(
769
- 'tiwl-show' => '.tiwl-dropdown-icon-custom',
770
- 'tiwl-hide' => '.tiwl-dropdown-icon-style',
771
  'tiwl-value' => 'custom',
772
  ),
773
  ),
774
  array(
775
- 'type' => 'uploadfile',
776
- 'name' => 'icon_upload',
777
- 'std' => '',
778
- 'text' => ' ',
779
  'class' => 'tiwl-dropdown-icon-custom',
780
  'extra' => array(
781
  'button' => array(
782
  'value' => __('Upload', 'ti-woocommerce-wishlist'),
783
  ),
784
- 'type' => array('image'),
785
  ),
786
  ),
787
  array(
788
- 'type' => 'select',
789
- 'name' => 'icon_style',
790
- 'std' => '',
791
- 'text' => __('"Wishlist" Counter Icon Color', 'ti-woocommerce-wishlist'),
792
  'options' => array(
793
- '' => __('Use font color', 'ti-woocommerce-wishlist'),
794
  'black' => __('Black', 'ti-woocommerce-wishlist'),
795
  'white' => __('White', 'ti-woocommerce-wishlist'),
796
  ),
797
- 'class' => 'tiwl-dropdown-icon-style',
798
  ),
799
  array(
800
- 'type' => 'checkboxonoff',
801
- 'name' => 'show_text',
802
- 'text' => __('Show "Wishlist" Counter Text', 'ti-woocommerce-wishlist'),
803
- 'std' => true,
804
  'extra' => array(
805
  'tiwl-show' => '.tiwl-dropdown-text',
806
  ),
807
  ),
808
  array(
809
- 'type' => 'text',
810
- 'name' => 'text',
811
- 'text' => __('"Wishlist" Counter Text', 'ti-woocommerce-wishlist'),
812
- 'std' => __('Wishlist - ', 'ti-woocommerce-wishlist'),
813
  'class' => 'tiwl-dropdown-text',
814
  ),
815
  array(
816
- 'type' => 'multiselect',
817
- 'name' => 'menu',
818
- 'text' => __('Add counter to menu', 'ti-woocommerce-wishlist'),
819
  'options' => $menus,
820
- 'desc' => __('You can add a wishlist products counter as item to the selected menu.', 'ti-woocommerce-wishlist'),
821
- 'extra' => array(
822
  'tiwl-value' => '0',
823
- 'tiwl-hide' => '.tiwl-menu-position',
824
  ),
825
  ),
826
  array(
827
- 'type' => 'number',
828
- 'name' => 'menu_order',
829
- 'text' => __('Counter position (Menu item order)', 'ti-woocommerce-wishlist'),
830
- 'desc' => __('Allows you to add the wishlist counter as a menu item and apply its position.', 'ti-woocommerce-wishlist'),
831
- 'std' => 100,
832
  'class' => 'tiwl-menu-position',
833
  'extra' => array(
834
  'step' => '1',
835
- 'min' => '1',
836
  ),
837
  ),
838
  array(
839
- 'type' => 'checkboxonoff',
840
- 'name' => 'show_counter',
841
- 'text' => __('Show number of products in counter', 'ti-woocommerce-wishlist'),
842
- 'std' => true,
843
  'extra' => array(
844
  'tiwl-show' => '.tiwl-zero-counter',
845
  ),
846
  ),
847
  array(
848
- 'type' => 'checkboxonoff',
849
- 'name' => 'hide_zero_counter',
850
- 'text' => __('Hide zero value', 'ti-woocommerce-wishlist'),
851
- 'desc' => __('Do not show the "0" value in a counter if wishlist is empty.', 'ti-woocommerce-wishlist'),
852
  'class' => 'tiwl-zero-counter',
853
- 'std' => false,
854
  ),
855
  ),
856
  ),
857
  );
858
 
859
- if ( ! empty($_GET['chat'])) {
860
- $settings[] = array(
861
- 'id' => 'chat',
862
- 'title' => __('Support chat settings', 'ti-woocommerce-wishlist'),
863
- 'desc' => '',
864
- 'show_names' => true,
865
- 'fields' => array(
866
- array(
867
- 'type' => 'checkboxonoff',
868
- 'name' => 'disabled',
869
- 'text' => __('Disable support chat', 'ti-woocommerce-wishlist'),
870
- 'std' => false,
871
- ),
872
  ),
873
- );
874
- }
 
875
 
876
  // Buttons.
877
  $settings[] = array(
878
- 'id' => 'save_buttons',
879
- 'class' => 'only-button',
880
  'noform' => true,
881
  'fields' => array(
882
  array(
883
- 'type' => 'button_submit',
884
- 'name' => 'setting_save',
885
- 'std' => '<span><i class="ftinvwl ftinvwl-check"></i></span>' . __('Save Settings', 'ti-woocommerce-wishlist'),
886
  'extra' => array('class' => 'tinvwl-btn split status-btn-ok'),
887
  ),
888
  array(
889
- 'type' => 'button_submit',
890
- 'name' => 'setting_reset',
891
- 'std' => '<span><i class="ftinvwl ftinvwl-times"></i></span>' . __('Reset', 'ti-woocommerce-wishlist'),
892
  'extra' => array('class' => 'tinvwl-btn split status-btn-ok tinvwl-confirm-reset'),
893
  ),
894
  array(
895
  'type' => 'button_submit_quick',
896
  'name' => 'setting_save_quick',
897
- 'std' => '<span><i class="ftinvwl ftinvwl-floppy-o"></i></span>' . __('Save', 'ti-woocommerce-wishlist'),
898
  ),
899
  ),
900
  );
@@ -911,9 +911,9 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
911
  */
912
  function constructor_load($sections)
913
  {
914
- $data = parent::constructor_load($sections);
915
- $data['general']['page_wishlist'] = $data['page']['wishlist'];
916
- $data['general']['processing_autoremove'] = $data['processing']['autoremove'];
917
  $data['general']['processing_autoremove_anyone'] = $data['processing']['autoremove_anyone'];
918
  $data['general']['processing_redirect_checkout'] = $data['processing']['redirect_checkout'];
919
 
@@ -928,7 +928,7 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
928
  function constructor_save($data)
929
  {
930
  parent::constructor_save($data);
931
- if (empty($data) || ! is_array($data)) {
932
  return false;
933
  }
934
  tinv_update_option('page', 'wishlist', $data['general']['page_wishlist']);
@@ -938,8 +938,8 @@ class TInvWL_Admin_Settings_General extends TInvWL_Admin_BaseSection
938
  tinv_update_option('processing', 'autoremove_status', 'tinvwl-addcart');
939
  if (filter_input(INPUT_POST, 'save_buttons-setting_reset')) {
940
  foreach (array_keys($data) as $key) {
941
- if ( ! in_array($key, array('page'))) {
942
- $data[ $key ] = array();
943
  }
944
  }
945
  parent::constructor_save($data);
8
  */
9
 
10
  // If this file is called directly, abort.
11
+ if (!defined('ABSPATH')) {
12
  die;
13
  }
14
 
56
  */
57
  function __construct($plugin_name, $version)
58
  {
59
+ $this->_name = $plugin_name;
60
  $this->_version = $version;
61
  parent::__construct($plugin_name, $version);
62
  add_action('tinvwl_section_before', array($this, 'premium_features'), 9);
70
  function menu()
71
  {
72
  return array(
73
+ 'title' => __('General Settings', 'ti-woocommerce-wishlist'),
74
+ 'method' => array($this, '_print_'),
75
+ 'slug' => '',
76
  'capability' => 'tinvwl_general_settings',
77
  );
78
  }
84
  */
85
  public function get_wp_menus()
86
  {
87
+ $menus = array('' => __('None', 'ti-woocommerce-wishlist'));
88
  $get_menus = get_terms('nav_menu', array('hide_empty' => true));
89
  foreach ($get_menus as $menu) {
90
+ $menus[$menu->term_id] = $menu->name;
91
  }
92
 
93
  return $menus;
100
  */
101
  function constructor_data()
102
  {
103
+ $lists = get_pages(array('number' => 9999999)); // @codingStandardsIgnoreLine WordPress.VIP.RestrictedFunctions.get_pages
104
  $page_list = array('' => '');
105
+ $menus = $this->get_wp_menus();
106
  foreach ($lists as $list) {
107
+ $page_list[$list->ID] = $list->post_title;
108
  }
109
 
110
  $settings = array(
111
  array(
112
+ 'id' => 'general',
113
+ 'title' => __('General Settings', 'ti-woocommerce-wishlist'),
114
+ 'desc' => __('Wishlist page needs to be selected so the plugin knows where it is. This page should be created upon installation of the plugin, if not you will need to create it manually.', 'ti-woocommerce-wishlist'),
115
  'show_names' => true,
116
+ 'fields' => array(
117
  array(
118
  'type' => 'text',
119
  'name' => 'default_title',
120
  'text' => __('Default Wishlist Name', 'ti-woocommerce-wishlist'),
121
+ 'std' => 'Default wishlist',
122
  ),
123
  array(
124
+ 'type' => 'select',
125
+ 'name' => 'page_wishlist',
126
+ 'text' => __('Wishlist Page', 'ti-woocommerce-wishlist'),
127
+ 'std' => '',
128
+ 'options' => $page_list,
129
  'validate' => FILTER_VALIDATE_INT,
130
  ),
131
  array(
132
+ 'type' => 'checkboxonoff',
133
+ 'name' => 'require_login',
134
+ 'text' => __('Require Login', 'ti-woocommerce-wishlist'),
135
+ 'desc' => __('Disallows guests to use Wishlist functionality until they sign-in.', 'ti-woocommerce-wishlist'),
136
+ 'std' => false,
137
  'extra' => array(
138
  'tiwl-show' => '.tiwl-general-redirect-require-login',
139
  ),
140
  ),
141
  array(
142
+ 'type' => 'checkboxonoff',
143
+ 'name' => 'redirect_require_login',
144
+ 'text' => __('Redirect to Login Page', 'ti-woocommerce-wishlist'),
145
+ 'desc' => '<span class="tiwl-button-show-notice-warning-popup"><strong>' . __('Currently this option could not be changed because "Show successful notice in popup" is disabled. Guests will be redirected automatically to a login page.', 'ti-woocommerce-wishlist') . '</strong></span><span class="tiwl-button-show-notice">' . __('If enabled, guests will be redirected to a login page once clicking the "Add to Wishlist" button or "Wishlist Products Counter" link. Otherwise a popup with login required notice will appear.', 'ti-woocommerce-wishlist') . '</span>',
146
+ 'std' => false,
147
  'class' => 'tiwl-general-redirect-require-login',
148
  ),
149
  array(
150
  'type' => 'checkboxonoff',
151
  'name' => 'link_in_myaccount',
152
  'text' => __('Show Link to Wishlist in my account', 'ti-woocommerce-wishlist'),
153
+ 'std' => true,
154
  ),
155
  array(
156
+ 'type' => 'checkboxonoff',
157
+ 'name' => 'processing_autoremove',
158
+ 'text' => __('Remove Product from Wishlist if added to cart', 'ti-woocommerce-wishlist'),
159
+ 'std' => true,
160
  'extra' => array('tiwl-show' => '.tiwl-processing-autoremove-anyone'),
161
  ),
162
  array(
163
  'type' => 'checkboxonoff',
164
  'name' => 'processing_redirect_checkout',
165
  'text' => __('Redirect to the checkout page from Wishlist if added to cart', 'ti-woocommerce-wishlist'),
166
+ 'std' => false,
167
  ),
168
  array(
169
+ 'type' => 'checkboxonoff',
170
+ 'name' => 'processing_autoremove_anyone',
171
+ 'text' => __('Remove by anyone', 'ti-woocommerce-wishlist'),
172
+ 'std' => false,
173
  'class' => 'tiwl-processing-autoremove-anyone',
174
  ),
175
  array(
176
+ 'type' => 'checkboxonoff',
177
+ 'name' => 'simple_flow',
178
+ 'text' => __('Remove product from Wishlist on second click', 'ti-woocommerce-wishlist'),
179
+ 'std' => false,
180
  'extra' => array(
181
  'tiwl-show' => '.tiwl-general-simple-flow>td, .tiwl-button-simple-flow',
182
  'tiwl-hide' => '.tiwl-general-simple-flow-hide>td',
184
  ),
185
  array(
186
  'type' => 'group',
187
+ 'id' => 'show_notice',
188
  ),
189
  array(
190
+ 'type' => 'checkboxonoff',
191
+ 'name' => 'show_notice',
192
+ 'text' => __('Show successful notice in popup', 'ti-woocommerce-wishlist'),
193
+ 'desc' => __('This option allows to show/hide a popup with successful or error notices after addition or removing products from a Wishlist.', 'ti-woocommerce-wishlist'),
194
+ 'std' => true,
195
  'extra' => array(
196
  'tiwl-show' => '.tiwl-button-show-notice',
197
  'tiwl-hide' => '.tiwl-button-show-notice-warning-popup',
198
  ),
199
  ),
200
  array(
201
+ 'type' => 'text',
202
+ 'name' => 'text_browse',
203
+ 'text' => __('"View Wishlist" button Text', 'ti-woocommerce-wishlist'),
204
+ 'std' => 'View Wishlist',
205
  'class' => 'tiwl-button-show-notice',
206
  ),
207
  array(
208
+ 'type' => 'checkboxonoff',
209
+ 'name' => 'redirect',
210
+ 'text' => __('Redirect to Wishlist', 'ti-woocommerce-wishlist'),
211
+ 'desc' => __('If enabled, user will be redirected to wishlist page after 5 sec from adding product to wishlist.', 'ti-woocommerce-wishlist'),
212
+ 'std' => true,
213
  'class' => 'tiwl-button-show-notice',
214
  ),
215
  array(
216
+ 'type' => 'text',
217
+ 'name' => 'text_added_to',
218
+ 'text' => __('"Product added to Wishlist" Text', 'ti-woocommerce-wishlist'),
219
+ 'std' => '{product_name} added to Wishlist',
220
+ 'desc' => __('You can use next placeholder in this field to get current product name: <code>{product_name}</code>, <code>{product_sku}</code>', 'ti-woocommerce-wishlist'),
221
  'class' => 'tiwl-button-show-notice',
222
  ),
223
  array(
224
+ 'type' => 'text',
225
+ 'name' => 'text_already_in',
226
+ 'text' => __('"Product already in Wishlist" Text', 'ti-woocommerce-wishlist'),
227
+ 'desc' => __('This notification will be shown if user will try to add a product that is already in the wishlist. ', 'ti-woocommerce-wishlist') . __('You can use next placeholder in this field to get current product name: <code>{product_name}</code>, <code>{product_sku}</code>', 'ti-woocommerce-wishlist'),
228
+ 'std' => '{product_name} already in Wishlist',
229
  'class' => 'tiwl-button-show-notice tiwl-general-simple-flow-hide',
230
  ),
231
  array(
232
+ 'type' => 'text',
233
+ 'name' => 'text_removed_from',
234
+ 'text' => __('"Product removed from Wishlist" Text', 'ti-woocommerce-wishlist'),
235
+ 'desc' => __('This notification will be shown once the product is removed from Wishlist on a single or a catalog page.', 'ti-woocommerce-wishlist'),
236
+ 'std' => 'Product removed from Wishlist',
237
  'class' => 'tiwl-button-show-notice tiwl-general-simple-flow',
238
  ),
239
  ),
240
  ),
241
  array(
242
+ 'id' => 'permalinks',
243
+ 'title' => __('Permalinks Settings', 'ti-woocommerce-wishlist'),
244
  'show_names' => false,
245
+ 'fields' => array(
246
  array(
247
  'type' => 'checkboxonoff',
248
  'name' => 'force',
249
  'text' => __('Force permalinks rewrite', 'ti-woocommerce-wishlist'),
250
  'desc' => __('This option should be enabled to avoid any issues with URL rewrites between other plugins and Wishlist', 'ti-woocommerce-wishlist'),
251
+ 'std' => false,
252
  ),
253
  ),
254
  ),
255
  array(
256
+ 'id' => 'page',
257
+ 'title' => __('Wishlist Page Options', 'ti-woocommerce-wishlist'),
258
+ 'desc' => __('Coming soon', 'ti-woocommerce-wishlist'),
259
  'show_names' => true,
260
+ 'style' => 'display:none;',
261
+ 'fields' => array(
262
+ array(
263
+ 'type' => 'select',
264
+ 'name' => 'wishlist',
265
+ 'text' => __('My Wishlist', 'ti-woocommerce-wishlist'),
266
+ 'std' => '',
267
+ 'options' => $page_list,
268
  'validate' => FILTER_VALIDATE_INT,
269
  ),
270
  ),
271
  ),
272
  array(
273
+ 'id' => 'processing',
274
+ 'title' => __('Wishlist Processing Options', 'ti-woocommerce-wishlist'),
275
+ 'desc' => __('Coming soon', 'ti-woocommerce-wishlist'),
276
+ 'style' => 'display:none;',
277
  'show_names' => true,
278
+ 'fields' => array(
279
  array(
280
+ 'type' => 'checkboxonoff',
281
+ 'name' => 'autoremove',
282
+ 'text' => __('Automatic removal', 'ti-woocommerce-wishlist'),
283
+ 'std' => true,
284
  'extra' => array('tiwl-show' => '.tiwl-processing-autoremove'),
285
  ),
286
  array(
287
+ 'type' => 'select',
288
+ 'name' => 'autoremove_status',
289
+ 'text' => __('Remove condition', 'ti-woocommerce-wishlist'),
290
+ 'std' => 'tinvwl-addcart',
291
  'options' => array(
292
  'tinvwl-addcart' => __('Add to Cart', 'ti-woocommerce-wishlist'),
293
  ),
294
+ 'class' => 'tiwl-processing-autoremove',
295
  ),
296
  array(
297
+ 'type' => 'checkboxonoff',
298
+ 'name' => 'redirect_checkout',
299
+ 'text' => __('Redirect to the checkout page from Wishlist if added to cart', 'ti-woocommerce-wishlist'),
300
+ 'std' => false,
301
  'class' => 'tiwl-processing-redirect-checkout',
302
  ),
303
  array(
304
+ 'type' => 'checkboxonoff',
305
+ 'name' => 'autoremove_anyone',
306
+ 'text' => __('Remove by anyone', 'ti-woocommerce-wishlist'),
307
+ 'std' => false,
308
  'class' => 'tiwl-processing-autoremove',
309
  ),
310
  ),
311
  ),
312
  array(
313
+ 'id' => 'add_to_wishlist',
314
+ 'title' => __('Product page "Add to Wishlist" Button Settings', 'ti-woocommerce-wishlist'),
315
  'show_names' => true,
316
+ 'fields' => array(
317
  array(
318
+ 'type' => 'select',
319
+ 'name' => 'position',
320
+ 'text' => __('Button position', 'ti-woocommerce-wishlist'),
321
+ 'desc' => __('Add this shortcode <code>[ti_wishlists_addtowishlist]</code> anywhere on product page, if you have chosen custom position for product button. You will have to do this for each product.', 'ti-woocommerce-wishlist'),
322
+ 'std' => 'after',
323
  'options' => array(
324
+ 'after' => __('After "Add to Cart" button', 'ti-woocommerce-wishlist'),
325
+ 'before' => __('Before "Add to Cart" button', 'ti-woocommerce-wishlist'),
326
  'thumbnails' => __('After Thumbnails', 'ti-woocommerce-wishlist'),
327
+ 'summary' => __('After summary', 'ti-woocommerce-wishlist'),
328
+ 'shortcode' => __('Custom position with code', 'ti-woocommerce-wishlist'),
329
  ),
330
  ),
331
  array(
332
+ 'type' => 'text',
333
+ 'name' => 'class',
334
+ 'text' => __('Button custom CSS class', 'ti-woocommerce-wishlist'),
335
+ 'desc' => __('You can add custom CSS classes to button markup separated by spaces. Most of themes using <code>button</code> class for this type of buttons.', 'ti-woocommerce-wishlist'),
336
+ 'std' => '',
337
  'extra' => array(
338
  'placeholder' => 'button btn-primary',
339
  ),
340
  ),
341
  array(
342
+ 'type' => 'select',
343
+ 'name' => 'icon',
344
+ 'text' => __('"Add to Wishlist" Icon', 'ti-woocommerce-wishlist'),
345
+ 'desc' => __('You can choose from our predefined icons or upload your custom icon. Custom icon size is limited to 16x16 px.', 'ti-woocommerce-wishlist'),
346
+ 'std' => 'heart',
347
  'options' => array(
348
+ '' => __('None', 'ti-woocommerce-wishlist'),
349
+ 'heart' => __('Heart', 'ti-woocommerce-wishlist'),
350
  'heart-plus' => __('Heart+', 'ti-woocommerce-wishlist'),
351
+ 'custom' => __('Custom', 'ti-woocommerce-wishlist'),
352
  ),
353
+ 'extra' => array(
354
+ 'class' => 'tiwl-button-icon',
355
+ 'tiwl-show' => '.tiwl-button-icon-custom',
356
+ 'tiwl-hide' => '.tiwl-button-icon-style',
357
  'tiwl-value' => 'custom',
358
  ),
359
  ),
360
  array(
361
+ 'type' => 'uploadfile',
362
+ 'name' => 'icon_upload',
363
+ 'std' => '',
364
+ 'text' => ' ',
365
  'class' => 'tiwl-button-icon-custom',
366
  'extra' => array(
367
  'button' => array(
368
  'value' => __('Upload', 'ti-woocommerce-wishlist'),
369
  ),
370
+ 'type' => array('image'),
371
  ),
372
  ),
373
  array(
374
+ 'type' => 'select',
375
+ 'name' => 'icon_style',
376
+ 'std' => '',
377
+ 'text' => __('"Add to Wishlist" Icon Color', 'ti-woocommerce-wishlist'),
378
  'options' => array(
379
+ '' => __('Use font color', 'ti-woocommerce-wishlist'),
380
  'black' => __('Black', 'ti-woocommerce-wishlist'),
381
  'white' => __('White', 'ti-woocommerce-wishlist'),
382
  ),
383
+ 'class' => 'tiwl-button-icon-style',
384
  ),
385
  array(
386
  'type' => 'checkboxonoff',
387
  'name' => 'show_preloader',
388
  'text' => __('Show preloader', 'ti-woocommerce-wishlist'),
389
  'desc' => __('If enabled, applies animation for the button icon until product adding or removing processed. (Usable for servers with slow connection mostly.)', 'ti-woocommerce-wishlist'),
390
+ 'std' => false,
391
  ),
392
  array(
393
+ 'type' => 'checkboxonoff',
394
+ 'name' => 'show_text',
395
+ 'text' => __('Show button text', 'ti-woocommerce-wishlist'),
396
+ 'std' => true,
397
  'extra' => array(
398
  'tiwl-show' => '.tiwl-button-text',
399
  ),
400
  ),
401
  array(
402
+ 'type' => 'group',
403
+ 'id' => 'show_text_single',
404
  'class' => 'tiwl-button-text',
405
  'style' => 'border-top: 0px; padding-top: 0px;',
406
  ),
408
  'type' => 'text',
409
  'name' => 'text',
410
  'text' => __('"Add to Wishlist" button Text', 'ti-woocommerce-wishlist'),
411
+ 'std' => 'Add to Wishlist',
412
  ),
413
  array(
414
+ 'type' => 'checkboxonoff',
415
+ 'name' => 'already_on',
416
+ 'text' => __('Show "Already In Wishlist" button Text', 'ti-woocommerce-wishlist'),
417
+ 'std' => false,
418
  'extra' => array(
419
  'tiwl-show' => '.tiwl-button-already-on',
420
  ),
421
  'class' => 'tiwl-general-simple-flow-hide',
422
  ),
423
  array(
424
+ 'type' => 'text',
425
+ 'name' => 'text_already_on',
426
+ 'text' => __('"Already In Wishlist" button Text', 'ti-woocommerce-wishlist'),
427
+ 'std' => 'Already In Wishlist',
428
  'class' => 'tiwl-button-already-on tiwl-general-simple-flow-hide',
429
  ),
430
  array(
431
+ 'type' => 'text',
432
+ 'name' => 'text_remove',
433
+ 'text' => __('"Remove from Wishlist" Button Text', 'ti-woocommerce-wishlist'),
434
+ 'std' => 'Remove from Wishlist',
435
  'class' => 'tiwl-button-simple-flow',
436
  ),
437
  ),
438
  ),
439
  array(
440
+ 'id' => 'add_to_wishlist_catalog',
441
+ 'title' => __('Product listing Button Settings', 'ti-woocommerce-wishlist'),
442
+ 'desc' => __('These are separate settings for the "Add to Wishlist" button on a product listing (Shop page, categories, etc.). You can also adjust button and text colors, size, etc. in a <code>TI Wishlist > Style Options.</code>', 'ti-woocommerce-wishlist'),
443
  'show_names' => true,
444
+ 'fields' => array(
445
  array(
446
+ 'type' => 'checkboxonoff',
447
+ 'name' => 'show_in_loop',
448
+ 'text' => __('Show in Product Listing', 'ti-woocommerce-wishlist'),
449
+ 'std' => true,
450
  'extra' => array(
451
  'tiwl-show' => '.tiwl-buttoncat-button',
452
  ),
453
  ),
454
  array(
455
+ 'type' => 'group',
456
+ 'id' => 'add_to_wishlist_catalog',
457
  'class' => 'tiwl-buttoncat-button',
458
  'style' => 'border-top: 0px; padding-top: 0px;',
459
  ),
460
  array(
461
+ 'type' => 'select',
462
+ 'name' => 'position',
463
+ 'text' => __('Button position', 'ti-woocommerce-wishlist'),
464
+ 'std' => 'after',
465
  'options' => array(
466
+ 'after' => __('After "Add to Cart" button', 'ti-woocommerce-wishlist'),
467
+ 'before' => __('Before "Add to Cart" button', 'ti-woocommerce-wishlist'),
468
  'above_thumb' => __('Above Thumbnail', 'ti-woocommerce-wishlist'),
469
+ 'shortcode' => __('Custom position with code', 'ti-woocommerce-wishlist'),
470
  ),
471
+ 'desc' => __('Note: if "Custom position with code" option is applied, the "Add to Wishlist" button should be added into template using <code>do_shortcode()</code> function like this:<br /><code>do_shortcode("[ti_wishlists_addtowishlist loop=yes]")</code>', 'ti-woocommerce-wishlist'),
472
  ),
473
  array(
474
+ 'type' => 'text',
475
+ 'name' => 'class',
476
+ 'text' => __('Button custom CSS class', 'ti-woocommerce-wishlist'),
477
+ 'desc' => __('You can add custom CSS classes to button markup separated by spaces. Most of themes using <code>button</code> class for this type of buttons.', 'ti-woocommerce-wishlist'),
478
+ 'std' => '',
479
  'extra' => array(
480
  'placeholder' => 'button btn-primary',
481
  ),
482
  ),
483
  array(
484
+ 'type' => 'select',
485
+ 'name' => 'icon',
486
+ 'text' => __('"Add to Wishlist" Icon', 'ti-woocommerce-wishlist'),
487
+ 'std' => 'heart',
488
  'options' => array(
489
+ '' => __('None', 'ti-woocommerce-wishlist'),
490
+ 'heart' => __('Heart', 'ti-woocommerce-wishlist'),
491
  'heart-plus' => __('Heart+', 'ti-woocommerce-wishlist'),
492
+ 'custom' => __('Custom', 'ti-woocommerce-wishlist'),
493
  ),
494
+ 'extra' => array(
495
+ 'tiwl-show' => '.tiwl-buttoncat-icon-custom',
496
+ 'tiwl-hide' => '.tiwl-buttoncat-icon-style',
497
  'tiwl-value' => 'custom',
498
  ),
499
  ),
500
  array(
501
+ 'type' => 'uploadfile',
502
+ 'name' => 'icon_upload',
503
+ 'std' => '',
504
+ 'text' => ' ',
505
  'class' => 'tiwl-buttoncat-icon-custom',
506
  'extra' => array(
507
  'button' => array(
508
  'value' => __('Upload', 'ti-woocommerce-wishlist'),
509
  ),
510
+ 'type' => array('image'),
511
  ),
512
  ),
513
  array(
514
+ 'type' => 'select',
515
+ 'name' => 'icon_style',
516
+ 'std' => '',
517
+ 'text' => __('"Add to Wishlist" Icon Color', 'ti-woocommerce-wishlist'),
518
  'options' => array(
519
+ '' => __('Use font color', 'ti-woocommerce-wishlist'),
520
  'black' => __('Black', 'ti-woocommerce-wishlist'),
521
  'white' => __('White', 'ti-woocommerce-wishlist'),
522
  ),
523
+ 'class' => 'tiwl-buttoncat-icon-style',
524
  ),
525
  array(
526
  'type' => 'checkboxonoff',
527
  'name' => 'show_preloader',
528
  'text' => __('Show preloader', 'ti-woocommerce-wishlist'),
529
  'desc' => __('If enabled, applies animation for the button icon until product adding or removing processed. (Usable for servers with slow connection mostly.)', 'ti-woocommerce-wishlist'),
530
+ 'std' => false,
531
  ),
532
  array(
533
+ 'type' => 'checkboxonoff',
534
+ 'name' => 'show_text',
535
+ 'text' => __('Show button text', 'ti-woocommerce-wishlist'),
536
+ 'std' => true,
537
  'extra' => array(
538
  'tiwl-show' => '.tiwl-button-text-catalog',
539
  ),
540
  ),
541
  array(
542
+ 'type' => 'group',
543
+ 'id' => 'show_text_single',
544
  'class' => 'tiwl-button-text-catalog',
545
  'style' => 'border-top: 0px; padding-top: 0px;',
546
  ),
548
  'type' => 'text',
549
  'name' => 'text',
550
  'text' => __('"Add to Wishlist" Text', 'ti-woocommerce-wishlist'),
551
+ 'std' => 'Add to Wishlist',
552
  ),
553
  array(
554
+ 'type' => 'checkboxonoff',
555
+ 'name' => 'already_on',
556
+ 'text' => __('Show "Already In Wishlist" button Text', 'ti-woocommerce-wishlist'),
557
+ 'std' => false,
558
  'extra' => array(
559
  'tiwl-show' => '.tiwl-button-already-on-catalog',
560
  ),
561
  'class' => 'tiwl-general-simple-flow-hide',
562
  ),
563
  array(
564
+ 'type' => 'text',
565
+ 'name' => 'text_already_on',
566
+ 'text' => __('"Already In Wishlist" button Text', 'ti-woocommerce-wishlist'),
567
+ 'std' => 'Already In Wishlist',
568
  'class' => 'tiwl-button-already-on-catalog tiwl-general-simple-flow-hide',
569
  ),
570
  array(
571
+ 'type' => 'text',
572
+ 'name' => 'text_remove',
573
+ 'text' => __('"Remove from Wishlist" Button Text', 'ti-woocommerce-wishlist'),
574
+ 'std' => 'Remove from Wishlist',
575
  'class' => 'tiwl-button-simple-flow',
576
  ),
577
  ),
578
  ),
579
  array(
580
+ 'id' => 'product_table',
581
+ 'title' => __('Wishlist Product Settings', 'ti-woocommerce-wishlist'),
582
+ 'desc' => __('Following options allows you to choose what information/functionality to show/enable in wishlist table on wishlist page.', 'ti-woocommerce-wishlist'),
583
  'show_names' => true,
584
+ 'fields' => array(
585
  array(
586
+ 'type' => 'checkboxonoff',
587
+ 'name' => 'add_to_cart',
588
+ 'text' => __('Show "Add to Cart" button', 'ti-woocommerce-wishlist'),
589
+ 'std' => true,
590
  'extra' => array('tiwl-show' => '.tiwl-table-action-addcart'),
591
  ),
592
  array(
593
+ 'type' => 'text',
594
+ 'name' => 'text_add_to_cart',
595
+ 'text' => __('"Add to Cart" Text', 'ti-woocommerce-wishlist'),
596
+ 'std' => 'Add to Cart',
597
  'class' => 'tiwl-table-action-addcart',
598
  ),
599
  array(
600
  'type' => 'checkboxonoff',
601
  'name' => 'colm_price',
602
  'text' => __('Show Unit price', 'ti-woocommerce-wishlist'),
603
+ 'std' => true,
604
  ),
605
  array(
606
  'type' => 'checkboxonoff',
607
  'name' => 'colm_stock',
608
  'text' => __('Show Stock status', 'ti-woocommerce-wishlist'),
609
+ 'std' => true,
610
  ),
611
  array(
612
  'type' => 'checkboxonoff',
613
  'name' => 'colm_date',
614
  'text' => __('Show Date of addition', 'ti-woocommerce-wishlist'),
615
+ 'std' => true,
616
  ),
617
  ),
618
  ),
619
  array(
620
+ 'id' => 'table',
621
+ 'title' => __('Wishlist Table Settings', 'ti-woocommerce-wishlist'),
622
+ 'desc' => __('Following options will help user to manage and add products to cart from wishlist table in bulk.', 'ti-woocommerce-wishlist'),
623
  'show_names' => true,
624
+ 'fields' => array(
625
  array(
626
+ 'type' => 'checkboxonoff',
627
+ 'name' => 'colm_checkbox',
628
+ 'text' => __('Show Checkboxes', 'ti-woocommerce-wishlist'),
629
+ 'std' => true,
630
  'extra' => array('tiwl-show' => '.tiwl-table-cb-button'),
631
  ),
632
  array(
633
+ 'type' => 'group',
634
+ 'id' => 'cb_button',
635
  'class' => 'tiwl-table-cb-button',
636
  ),
637
  array(
639
  'name' => 'colm_actions',
640
  'text' => __('Show Actions button', 'ti-woocommerce-wishlist'),
641
  'desc' => __('Bulk actions drop down at the bottom of wishlist table', 'ti-woocommerce-wishlist'),
642
+ 'std' => true,
643
  ),
644
  array(
645
+ 'type' => 'checkboxonoff',
646
+ 'name' => 'add_select_to_cart',
647
+ 'text' => __('Show "Add Selected to Cart" button', 'ti-woocommerce-wishlist'),
648
+ 'std' => true,
649
  'extra' => array('tiwl-show' => '.tiwl-table-addcart-sel'),
650
  ),
651
  array(
652
+ 'type' => 'text',
653
+ 'name' => 'text_add_select_to_cart',
654
+ 'text' => __('"Add Selected to Cart" Button Text', 'ti-woocommerce-wishlist'),
655
+ 'std' => 'Add Selected to Cart',
656
  'class' => 'tiwl-table-addcart-sel',
657
  ),
658
  array(
659
  'type' => 'group',
660
+ 'id' => '_button',
661
  ),
662
  array(
663
+ 'type' => 'checkboxonoff',
664
+ 'name' => 'add_all_to_cart',
665
+ 'text' => __('Show "Add All to Cart" button', 'ti-woocommerce-wishlist'),
666
+ 'std' => true,
667
  'extra' => array('tiwl-show' => '.tiwl-table-addcart-all'),
668
  ),
669
  array(
670
+ 'type' => 'text',
671
+ 'name' => 'text_add_all_to_cart',
672
+ 'text' => __('"Add All to Cart" Button Text', 'ti-woocommerce-wishlist'),
673
+ 'std' => 'Add All to Cart',
674
  'class' => 'tiwl-table-addcart-all',
675
  ),
676
  ),
677
  ),
678
  array(
679
+ 'id' => 'social',
680
  'show_names' => true,
681
+ 'fields' => array(
682
  array(
683
+ 'type' => 'group',
684
+ 'id' => 'social',
685
+ 'desc' => __('Following options enable/disable Social share icons below wishlist table on wishlist page. Wishlist owner can easily share their wishlists using this button on social networks. Wishlist privacy should be set to public or shared status, private wishlists can\'t be shared.', 'ti-woocommerce-wishlist'),
686
  'class' => 'tinvwl-info-top',
687
  ),
688
  array(
689
+ 'type' => 'html',
690
+ 'name' => 'social',
691
+ 'text' => __('Social Networks Sharing Options', 'ti-woocommerce-wishlist'),
692
  'class' => 'tinvwl-header-row tinvwl-line-border',
693
  ),
694
  array(
695
  'type' => 'checkboxonoff',
696
  'name' => 'facebook',
697
  'text' => __('Show "Facebook" Button', 'ti-woocommerce-wishlist'),
698
+ 'std' => true,
699
  ),
700
  array(
701
  'type' => 'checkboxonoff',
702
  'name' => 'twitter',
703
  'text' => __('Show "Twitter" Button', 'ti-woocommerce-wishlist'),
704
+ 'std' => true,
705
  ),
706
  array(
707
  'type' => 'checkboxonoff',
708
  'name' => 'pinterest',
709
  'text' => __('Show "Pinterest" Button', 'ti-woocommerce-wishlist'),
710
+ 'std' => true,
711
  ),
712
  array(
713
  'type' => 'checkboxonoff',
714
  'name' => 'whatsapp',
715
  'text' => __('Show "WhatsApp" Button', 'ti-woocommerce-wishlist'),
716
+ 'std' => true,
717
  ),
718
  array(
719
  'type' => 'checkboxonoff',
720
  'name' => 'clipboard',
721
  'text' => __('Show "Copy to clipboard" Button', 'ti-woocommerce-wishlist'),
722
+ 'std' => true,
723
  ),
724
  array(
725
  'type' => 'checkboxonoff',
726
  'name' => 'email',
727
  'text' => __('Show "Share by Email" Button', 'ti-woocommerce-wishlist'),
728
+ 'std' => true,
729
  ),
730
  array(
731
  'type' => 'text',
732
  'name' => 'share_on',
733
  'text' => __('"Share on" Text', 'ti-woocommerce-wishlist'),
734
+ 'std' => 'Share on',
735
  ),
736
  array(
737
+ 'type' => 'select',
738
+ 'name' => 'icon_style',
739
+ 'text' => __('Social Icons Color', 'ti-woocommerce-wishlist'),
740
+ 'std' => '',
741
+ 'options' => array(
742
+ '' => __('Use font color', 'ti-woocommerce-wishlist'),
743
+ 'dark' => __('Dark', 'ti-woocommerce-wishlist'),
744
  'white' => __('White', 'ti-woocommerce-wishlist'),
745
  ),
746
  'validate' => FILTER_DEFAULT,
748
  ),
749
  ),
750
  array(
751
+ 'id' => 'topline',
752
+ 'title' => __('Wishlist Product Counter', 'ti-woocommerce-wishlist'),
753
+ 'desc' => sprintf(__('Add this shortcode <code>[ti_wishlist_products_counter]</code> anywhere into a page content to show Wishlist Counter.<br/><br/>It can be also added as a widget <code>Wishlist Products Counter</code> under the <a href="%s">Appearance -> Widgets</a> section.', 'ti-woocommerce-wishlist'), esc_url(admin_url('widgets.php'))),
754
  'show_names' => true,
755
+ 'fields' => array(
756
  array(
757
+ 'type' => 'select',
758
+ 'name' => 'icon',
759
+ 'text' => __('"Wishlist" Counter Icon', 'ti-woocommerce-wishlist'),
760
+ 'std' => 'heart',
761
  'options' => array(
762
+ '' => __('None', 'ti-woocommerce-wishlist'),
763
+ 'heart' => __('Heart', 'ti-woocommerce-wishlist'),
764
  'heart-plus' => __('Heart+', 'ti-woocommerce-wishlist'),
765
+ 'custom' => __('Custom', 'ti-woocommerce-wishlist'),
766
  ),
767
+ 'desc' => __('You can choose from our predefined icons or upload your custom icon. Custom icon size is limited to 16x16 px.', 'ti-woocommerce-wishlist'),
768
+ 'extra' => array(
769
+ 'tiwl-show' => '.tiwl-dropdown-icon-custom',
770
+ 'tiwl-hide' => '.tiwl-dropdown-icon-style',
771
  'tiwl-value' => 'custom',
772
  ),
773
  ),
774
  array(
775
+ 'type' => 'uploadfile',
776
+ 'name' => 'icon_upload',
777
+ 'std' => '',
778
+ 'text' => ' ',
779
  'class' => 'tiwl-dropdown-icon-custom',
780
  'extra' => array(
781
  'button' => array(
782
  'value' => __('Upload', 'ti-woocommerce-wishlist'),
783
  ),
784
+ 'type' => array('image'),
785
  ),
786
  ),
787
  array(
788
+ 'type' => 'select',
789
+ 'name' => 'icon_style',
790
+ 'std' => '',
791
+ 'text' => __('"Wishlist" Counter Icon Color', 'ti-woocommerce-wishlist'),
792
  'options' => array(
793
+ '' => __('Use font color', 'ti-woocommerce-wishlist'),
794
  'black' => __('Black', 'ti-woocommerce-wishlist'),
795
  'white' => __('White', 'ti-woocommerce-wishlist'),
796
  ),
797
+ 'class' => 'tiwl-dropdown-icon-style',
798
  ),
799
  array(
800
+ 'type' => 'checkboxonoff',
801
+ 'name' => 'show_text',
802
+ 'text' => __('Show "Wishlist" Counter Text', 'ti-woocommerce-wishlist'),
803
+ 'std' => true,
804
  'extra' => array(
805
  'tiwl-show' => '.tiwl-dropdown-text',
806
  ),
807
  ),
808
  array(
809
+ 'type' => 'text',
810
+ 'name' => 'text',
811
+ 'text' => __('"Wishlist" Counter Text', 'ti-woocommerce-wishlist'),
812
+ 'std' => __('Wishlist - ', 'ti-woocommerce-wishlist'),
813
  'class' => 'tiwl-dropdown-text',
814
  ),
815
  array(
816
+ 'type' => 'multiselect',
817
+ 'name' => 'menu',
818
+ 'text' => __('Add counter to menu', 'ti-woocommerce-wishlist'),
819
  'options' => $menus,
820
+ 'desc' => __('You can add a wishlist products counter as item to the selected menu.', 'ti-woocommerce-wishlist'),
821
+ 'extra' => array(
822
  'tiwl-value' => '0',
823
+ 'tiwl-hide' => '.tiwl-menu-position',
824
  ),
825
  ),
826
  array(
827
+ 'type' => 'number',
828
+ 'name' => 'menu_order',
829
+ 'text' => __('Counter position (Menu item order)', 'ti-woocommerce-wishlist'),
830
+ 'desc' => __('Allows you to add the wishlist counter as a menu item and apply its position.', 'ti-woocommerce-wishlist'),
831
+ 'std' => 100,
832
  'class' => 'tiwl-menu-position',
833
  'extra' => array(
834
  'step' => '1',
835
+ 'min' => '1',
836
  ),
837
  ),
838
  array(
839
+ 'type' => 'checkboxonoff',
840
+ 'name' => 'show_counter',
841
+ 'text' => __('Show number of products in counter', 'ti-woocommerce-wishlist'),
842
+ 'std' => true,
843
  'extra' => array(
844
  'tiwl-show' => '.tiwl-zero-counter',
845
  ),
846
  ),
847
  array(
848
+ 'type' => 'checkboxonoff',
849
+ 'name' => 'hide_zero_counter',
850
+ 'text' => __('Hide zero value', 'ti-woocommerce-wishlist'),
851
+ 'desc' => __('Do not show the "0" value in a counter if wishlist is empty.', 'ti-woocommerce-wishlist'),
852
  'class' => 'tiwl-zero-counter',
853
+ 'std' => false,
854
  ),
855
  ),
856
  ),
857
  );
858
 
859
+
860
+ $settings[] = array(
861
+ 'id' => 'chat',
862
+ 'title' => __('Support Chat Settings', 'ti-woocommerce-wishlist'),
863
+ 'desc' => __('Enable the support chat to get the most from our service and get answers to your questions promptly. We optimized the support process to get the required details from your current setup to solve your issues faster. Dedicated to your Care.', 'ti-woocommerce-wishlist'),
864
+ 'show_names' => true,
865
+ 'fields' => array(
866
+ array(
867
+ 'type' => 'checkboxonoff',
868
+ 'name' => 'enabled',
869
+ 'text' => __('Enable support chat', 'ti-woocommerce-wishlist'),
870
+ 'std' => false,
 
871
  ),
872
+ ),
873
+ );
874
+
875
 
876
  // Buttons.
877
  $settings[] = array(
878
+ 'id' => 'save_buttons',
879
+ 'class' => 'only-button',
880
  'noform' => true,
881
  'fields' => array(
882
  array(
883
+ 'type' => 'button_submit',
884
+ 'name' => 'setting_save',
885
+ 'std' => '<span><i class="ftinvwl ftinvwl-check"></i></span>' . __('Save Settings', 'ti-woocommerce-wishlist'),
886
  'extra' => array('class' => 'tinvwl-btn split status-btn-ok'),
887
  ),
888
  array(
889
+ 'type' => 'button_submit',
890
+ 'name' => 'setting_reset',
891
+ 'std' => '<span><i class="ftinvwl ftinvwl-times"></i></span>' . __('Reset', 'ti-woocommerce-wishlist'),
892
  'extra' => array('class' => 'tinvwl-btn split status-btn-ok tinvwl-confirm-reset'),
893
  ),
894
  array(
895
  'type' => 'button_submit_quick',
896
  'name' => 'setting_save_quick',
897
+ 'std' => '<span><i class="ftinvwl ftinvwl-floppy-o"></i></span>' . __('Save', 'ti-woocommerce-wishlist'),
898
  ),
899
  ),
900
  );
911
  */
912
  function constructor_load($sections)
913
  {
914
+ $data = parent::constructor_load($sections);
915
+ $data['general']['page_wishlist'] = $data['page']['wishlist'];
916
+ $data['general']['processing_autoremove'] = $data['processing']['autoremove'];
917
  $data['general']['processing_autoremove_anyone'] = $data['processing']['autoremove_anyone'];
918
  $data['general']['processing_redirect_checkout'] = $data['processing']['redirect_checkout'];
919
 
928
  function constructor_save($data)
929
  {
930
  parent::constructor_save($data);
931
+ if (empty($data) || !is_array($data)) {
932
  return false;
933
  }
934
  tinv_update_option('page', 'wishlist', $data['general']['page_wishlist']);
938
  tinv_update_option('processing', 'autoremove_status', 'tinvwl-addcart');
939
  if (filter_input(INPUT_POST, 'save_buttons-setting_reset')) {
940
  foreach (array_keys($data) as $key) {
941
+ if (!in_array($key, array('page'))) {
942
+ $data[$key] = array();
943
  }
944
  }
945
  parent::constructor_save($data);
admin/tinvwl.class.php CHANGED
@@ -80,6 +80,9 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
80
  } elseif (!tinv_get_option('page', 'wishlist')) {
81
  add_action('admin_notices', array($this, 'empty_page_admin_notice'));
82
  }
 
 
 
83
  add_action('woocommerce_system_status_report', array($this, 'system_report_templates'));
84
 
85
  add_action('switch_theme', array($this, 'admin_notice_outdated_templates'));
@@ -126,6 +129,19 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
126
  );
127
  }
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  /**
130
  * Creation mune and sub-menu
131
  */
@@ -221,7 +237,7 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
221
  ));
222
  wp_enqueue_script($this->_name);
223
 
224
- if (!tinv_get_option('chat', 'disabled')) {
225
 
226
  $geo = new WC_Geolocation(); // Get WC_Geolocation instance object
227
  $user_ip = $geo->get_ip_address(); // Get user IP
80
  } elseif (!tinv_get_option('page', 'wishlist')) {
81
  add_action('admin_notices', array($this, 'empty_page_admin_notice'));
82
  }
83
+ if (!tinv_get_option('chat', 'enabled')) {
84
+ add_action('admin_notices', array($this, 'enable_chat_admin_notice'));
85
+ }
86
  add_action('woocommerce_system_status_report', array($this, 'system_report_templates'));
87
 
88
  add_action('switch_theme', array($this, 'admin_notice_outdated_templates'));
129
  );
130
  }
131
 
132
+ /**
133
+ * Notice to enable support chat.
134
+ */
135
+ function enable_chat_admin_notice()
136
+ {
137
+ printf('<div class="notice notice-warning"><p>%1$s</p><p><a href="%2$s" class="button-primary">%3$s</a></p></div>',
138
+ __('The Support Chat is disabled by default for the plugin setting pages. Enable it to get the most from our service!', 'ti-woocommerce-wishlist'), // @codingStandardsIgnoreLine WordPress.XSS.EscapeOutput.OutputNotEscaped
139
+ esc_url(admin_url('admin.php?page=tinvwl#chat')),
140
+ esc_html__('Enable Support Chat', 'ti-woocommerce-wishlist'),
141
+ );
142
+ }
143
+
144
+
145
  /**
146
  * Creation mune and sub-menu
147
  */
237
  ));
238
  wp_enqueue_script($this->_name);
239
 
240
+ if (tinv_get_option('chat', 'enabled')) {
241
 
242
  $geo = new WC_Geolocation(); // Get WC_Geolocation instance object
243
  $user_ip = $geo->get_ip_address(); // Get user IP
assets/css/admin-form-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tiwlform-number-container{display:inline-block;margin:2px;position:relative;vertical-align:middle}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tiwlform-number-container{display:inline-block;margin:2px;position:relative;vertical-align:middle}
assets/css/admin-form.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tiwlform-number-container{display:inline-block;margin:2px;position:relative;vertical-align:middle}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tiwlform-number-container{display:inline-block;margin:2px;position:relative;vertical-align:middle}
assets/css/admin-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  *{-webkit-box-sizing:border-box;box-sizing:border-box}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  *{-webkit-box-sizing:border-box;box-sizing:border-box}
assets/css/admin-setup-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  html{background:#f6f3ed}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  html{background:#f6f3ed}
assets/css/admin-setup.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  html{background:#f6f3ed}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  html{background:#f6f3ed}
assets/css/admin.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  *{-webkit-box-sizing:border-box;box-sizing:border-box}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  *{-webkit-box-sizing:border-box;box-sizing:border-box}
assets/css/public-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist form,.tinv-wishlist p:last-child,.tinv-wishlist table{margin-bottom:0}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist form,.tinv-wishlist p:last-child,.tinv-wishlist table{margin-bottom:0}
assets/css/public.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist form,.tinv-wishlist p:last-child,.tinv-wishlist table{margin-bottom:0}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist form,.tinv-wishlist p:last-child,.tinv-wishlist table{margin-bottom:0}
assets/css/theme-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type="button"],.tinv-wishlist input[type="reset"],.tinv-wishlist input[type="submit"]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type="button"],.tinv-wishlist input[type="reset"],.tinv-wishlist input[type="submit"]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
assets/css/theme.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type="button"],.tinv-wishlist input[type="reset"],.tinv-wishlist input[type="submit"]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  .tinv-wishlist,.tinv-wishlist input,.tinv-wishlist select,.tinv-wishlist textarea,.tinv-wishlist button,.tinv-wishlist input[type="button"],.tinv-wishlist input[type="reset"],.tinv-wishlist input[type="submit"]{font-family:Georgia,serif;font-size:14px;font-weight:400;text-transform:none;line-height:1.75}
assets/css/webfont-rtl.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  @font-face{font-family:'tinvwl-webfont';font-display:block;src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi");src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.woff2?ver=xu2uyi") format("woff2"),url("../fonts/tinvwl-webfont.woff?ver=xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.ttf?ver=xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.svg?ver=xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  @font-face{font-family:'tinvwl-webfont';font-display:block;src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi");src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.woff2?ver=xu2uyi") format("woff2"),url("../fonts/tinvwl-webfont.woff?ver=xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.ttf?ver=xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.svg?ver=xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
assets/css/webfont.min.css CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  @font-face{font-family:'tinvwl-webfont';font-display:block;src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi");src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.woff2?ver=xu2uyi") format("woff2"),url("../fonts/tinvwl-webfont.woff?ver=xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.ttf?ver=xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.svg?ver=xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  @font-face{font-family:'tinvwl-webfont';font-display:block;src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi");src:url("../fonts/tinvwl-webfont.eot?ver=xu2uyi#iefix") format("embedded-opentype"),url("../fonts/tinvwl-webfont.woff2?ver=xu2uyi") format("woff2"),url("../fonts/tinvwl-webfont.woff?ver=xu2uyi") format("woff"),url("../fonts/tinvwl-webfont.ttf?ver=xu2uyi") format("truetype"),url("../fonts/tinvwl-webfont.svg?ver=xu2uyi#tinvwl-webfont") format("svg");font-weight:normal;font-style:normal}
assets/js/admin.min.js CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  "use strict";function TInvWL($,h){this.pf="tinvwl",this.g="_",this.ho=h||!1,this.n="TInvWL",this.aj_act=function(t){return[this.pf,t].join(this.g)},this._csel=function(t,n){return"{0}{1}{2}".format(n=n||".",this.pf,t)},this._tm=function(t){var n=$("script#{0}[type='text/template']".format(t));return n.length?n.html():""},this.formElm=function(){if($(this._csel("-form-onoff")).tiwl_onoff(),$("input[type=checkbox][tiwl-show], input[type=checkbox][tiwl-hide]").tiwl_onoffblock(),$("[tiwl-value][tiwl-show], [tiwl-value][tiwl-hide]").tiwl_byvalueblock(),void 0!==$.fn.wpColorPicker){var e=function(t){var n=t.substring(1),i=parseInt(n,16);return.2126*(i>>16&255)+.7152*(i>>8&255)+.0722*(i>>0&255)},n=this._csel("-form-color");$(n).each(function(){var n=$(this),t=$(this).closest(".tinvwl-color-picker"),i=t.find(".tinvwl-eyedropper");n.css("background-color",n.val()),175<e(n.val())&&n.css("color","#000000"),n.iris({mode:"hsv",target:$(this).parent().parent(),change:function(t,n){175<e(n.color.toCSS())?$(this).css("color","#000000"):$(this).css("color",""),$(this).css("background-color",n.color.toCSS())}}),t.on("click",".iris-square-value",function(t){t.preventDefault(),n.iris("toggle")}),i.on("click",function(t){t.preventDefault(),n.iris("show")}),n.on("focusin",function(){n.iris("show")})}),$(document).on("click",function(t){$(t.target).is(n+", .iris-picker, .iris-picker-inner, .iris-slider-offset, .tinvwl-eyedropper, .tinvwl-eyedropper .ftinvwl-eyedropper")?$(n).not($(t.target).closest(".tinvwl-color-picker").find(n)).iris("hide"):$(n).iris("hide")})}},this.wizard_page=function(t){$(t).find("select").change(this._wizard_page_ch),this.wizard_page_ch($(t).find("select"))},this.wizard_page_ch=function(t){var n=(t=$(t)).parent(this._csel("-page-select")),i=n.find("input[type=hidden]").val(),e=n.find(this._csel("-error-icon")),o=n.find(this._csel("-error-desc"));""!==t.val()?(n.removeClass("tinvwl-error"),e.hide(),o.hide()):0==i&&(n.addClass("tinvwl-error"),e.show(),o.show())},this.pageElm=function(){$(this._csel("-header","div.")).prependTo("#wpbody-content"),$(this._csel("-page-select")).each(this._wizard_page),$(".bulkactions [type=submit]").each(this._control_bulkactions),$(".action-search [type=submit]").each(this._control_search)},this.control_bulkactions=function(t){$(t).on("click",this._control_bulkactions_ck)},this.control_bulkactions_ck=function(t,n){var i=(t=$(t)).parents(".bulkactions").eq(0).find("[name=action]"),e=t.parents("form").eq(0);i&&("-1"!==i.val()&&e.find("input[type=checkbox]:checked").length||n.preventDefault())},this.control_search=function(t){$(t).on("click",this._control_search_ck)},this.control_search_ck=function(t,n){var i=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");i&&""===i.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t=this.n;if(this.ho){var n=new Date;t=t+n.getFullYear()+n.getMonth()+n.getDate()}window[t]=this},this.cg(),String.prototype.format||(String.prototype.format=function(){var i=arguments;return this.replace(/{(\d+)}/g,function(t,n){return void 0!==i[n]?i[n]:t})}),function(o){var n=o.n,ho=o.ho,c="";for(var i in ho&&(c="t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),"),o)"function"!=typeof o[i]||"_"===i[0]||o.hasOwnProperty("_"+i)||eval("o._"+i+"=function(a,b,c,d){var n='"+n+"',"+c+"o=window[n]||null;if (o) {return o."+i+"(this,a,b,c,d);};};")}(this)}!function(s){s.fn.tiwl_onoff=function(t){var o=s.extend(!0,{},{value:{on:"",off:""},class:"tiwlform-onoff",wrap:"container",button:"button"},t);return s(this).each(function(){var n=s(this),t=s("<div>").attr({class:o.class+"-"+o.button}),i=o.class+"-"+o.wrap,e=s("<div>").attr({id:n.attr("id")+"_"+o.wrap,class:i});return n.is("input")&&(e.attr("class",e.attr("class")+" "+n.attr("class")),n.is(":disabled")&&(e.toggleClass("disabled",n.is(":disabled")),n.prop("disabled",!1)),e.toggleClass("checked",n.is(":checked")),n.hide().removeAttr("class").wrap(e).before(t),e=n.parent(),n.on("change",function(t){if(e.hasClass("disabled"))return t.preventDefault();e.toggleClass("checked",s(this).is(":checked"))}),e.on("click",function(t){if(e.hasClass("disabled"))return t.preventDefault();n.is(":enabled")&&e.hasClass("checked")===n.is(":checked")&&n.click()})),n})},s.fn.tiwl_onoffblock=function(t){var n={onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},c=s.extend(!0,{},n,t);return s(this).each(function(){function t(){function t(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){c.onEachElm.call(s(n).toggle(i))})}var n=s(this),i=n.attr("tiwl-show"),e=n.attr("tiwl-hide"),o=c.isChecked.call(n);return"string"==typeof i&&t(i,o),"string"==typeof e&&t(e,!o),n}var n=s(this);return n.is("input")&&"checkbox"==n.attr("type")?(s(this).on("change",t),t.call(n)):n})},s.fn.tiwl_byvalueblock=function(t){var n={onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},i=s.extend(!0,{},n,t);return s(this).each(function(){function t(e){function t(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){e.onEachElm.call(s(n).toggle(i))})}var n=s(this),i=n.attr("tiwl-show"),o=n.attr("tiwl-hide"),c=e.onClick.call(n);return"string"==typeof i&&t(i,c),"string"==typeof o&&t(o,!c),n}var n=s(this);return n.is("input")||n.is("select")?(s(this).on("change",function(){t.call(this,i)}),t.call(n,i)):n})};var n=new TInvWL(s);s(document).ready(function(){if(n.Run(),jQuery('input[name="general-show_notice"]').change(function(){var t=!jQuery(this).is(":checked"),n=jQuery('input[name="general-redirect_require_login"]');t&&!n.is(":checked")&&n.click().trigger("change"),n.closest(".tiwlform-onoff-container").toggleClass("disabled",t)}).change(),s(".tablenav").each(function(){var t=s(this);s.trim(t.find(".alignleft").html()).length||t.find(".alignleft").remove(),s.trim(t.find(".alignright").html()).length&&!t.find(".tablenav-pages").hasClass("one-page")||(t.find(".alignright").remove(),t.find(".tinv-wishlist-clear").remove()),s.trim(t.html()).length||t.remove()}),s(".tablenav .bulkactions select").addClass("tinvwl-select grey").wrap('<span class="tinvwl-select-wrap">').parent().append('<span class="tinvwl-caret"><span></span></span>'),s(".tablenav .bulkactions .button.action, .tablenav #search-submit").removeClass("button").addClass("tinvwl-btn grey"),s(".tinvwl-modal-btn").on("click",function(){s(this).next(".tinvwl-modal").addClass("tinvwl-modal-open")}),s(".tinvwl-overlay, .tinvwl-close-modal, .tinvwl_button_close").on("click",function(t){t.preventDefault(),s(this).parents(".tinvwl-modal:first").removeClass("tinvwl-modal-open")}),void 0!==s.fn.popover){var t=s(".tinvwl-help");t.popover({content:function(){return s(this).closest(".tinvwl-info-wrap").find(".tinvwl-info-desc").html()}}),t.on("click",function(){s(this).popover("toggle")}),t.on("focusout",function(){s(this).popover("hide")}),s(window).on("resize",function(){t.popover("hide")})}s("body").on("click",".tinvwl-confirm-reset",function(t){t.preventDefault(),confirm(tinvwl_comfirm.text_comfirm_reset)&&s(this).removeClass("tinvwl-confirm-reset").trigger("click")})})}(jQuery);
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
  "use strict";function TInvWL($,h){this.pf="tinvwl",this.g="_",this.ho=h||!1,this.n="TInvWL",this.aj_act=function(t){return[this.pf,t].join(this.g)},this._csel=function(t,n){return"{0}{1}{2}".format(n=n||".",this.pf,t)},this._tm=function(t){var n=$("script#{0}[type='text/template']".format(t));return n.length?n.html():""},this.formElm=function(){if($(this._csel("-form-onoff")).tiwl_onoff(),$("input[type=checkbox][tiwl-show], input[type=checkbox][tiwl-hide]").tiwl_onoffblock(),$("[tiwl-value][tiwl-show], [tiwl-value][tiwl-hide]").tiwl_byvalueblock(),void 0!==$.fn.wpColorPicker){var e=function(t){var n=t.substring(1),i=parseInt(n,16);return.2126*(i>>16&255)+.7152*(i>>8&255)+.0722*(i>>0&255)},n=this._csel("-form-color");$(n).each(function(){var n=$(this),t=$(this).closest(".tinvwl-color-picker"),i=t.find(".tinvwl-eyedropper");n.css("background-color",n.val()),175<e(n.val())&&n.css("color","#000000"),n.iris({mode:"hsv",target:$(this).parent().parent(),change:function(t,n){175<e(n.color.toCSS())?$(this).css("color","#000000"):$(this).css("color",""),$(this).css("background-color",n.color.toCSS())}}),t.on("click",".iris-square-value",function(t){t.preventDefault(),n.iris("toggle")}),i.on("click",function(t){t.preventDefault(),n.iris("show")}),n.on("focusin",function(){n.iris("show")})}),$(document).on("click",function(t){$(t.target).is(n+", .iris-picker, .iris-picker-inner, .iris-slider-offset, .tinvwl-eyedropper, .tinvwl-eyedropper .ftinvwl-eyedropper")?$(n).not($(t.target).closest(".tinvwl-color-picker").find(n)).iris("hide"):$(n).iris("hide")})}},this.wizard_page=function(t){$(t).find("select").change(this._wizard_page_ch),this.wizard_page_ch($(t).find("select"))},this.wizard_page_ch=function(t){var n=(t=$(t)).parent(this._csel("-page-select")),i=n.find("input[type=hidden]").val(),e=n.find(this._csel("-error-icon")),o=n.find(this._csel("-error-desc"));""!==t.val()?(n.removeClass("tinvwl-error"),e.hide(),o.hide()):0==i&&(n.addClass("tinvwl-error"),e.show(),o.show())},this.pageElm=function(){$(this._csel("-header","div.")).prependTo("#wpbody-content"),$(this._csel("-page-select")).each(this._wizard_page),$(".bulkactions [type=submit]").each(this._control_bulkactions),$(".action-search [type=submit]").each(this._control_search)},this.control_bulkactions=function(t){$(t).on("click",this._control_bulkactions_ck)},this.control_bulkactions_ck=function(t,n){var i=(t=$(t)).parents(".bulkactions").eq(0).find("[name=action]"),e=t.parents("form").eq(0);i&&("-1"!==i.val()&&e.find("input[type=checkbox]:checked").length||n.preventDefault())},this.control_search=function(t){$(t).on("click",this._control_search_ck)},this.control_search_ck=function(t,n){var i=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");i&&""===i.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t=this.n;if(this.ho){var n=new Date;t=t+n.getFullYear()+n.getMonth()+n.getDate()}window[t]=this},this.cg(),String.prototype.format||(String.prototype.format=function(){var i=arguments;return this.replace(/{(\d+)}/g,function(t,n){return void 0!==i[n]?i[n]:t})}),function(o){var n=o.n,ho=o.ho,c="";for(var i in ho&&(c="t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),"),o)"function"!=typeof o[i]||"_"===i[0]||o.hasOwnProperty("_"+i)||eval("o._"+i+"=function(a,b,c,d){var n='"+n+"',"+c+"o=window[n]||null;if (o) {return o."+i+"(this,a,b,c,d);};};")}(this)}!function(s){s.fn.tiwl_onoff=function(t){var o=s.extend(!0,{},{value:{on:"",off:""},class:"tiwlform-onoff",wrap:"container",button:"button"},t);return s(this).each(function(){var n=s(this),t=s("<div>").attr({class:o.class+"-"+o.button}),i=o.class+"-"+o.wrap,e=s("<div>").attr({id:n.attr("id")+"_"+o.wrap,class:i});return n.is("input")&&(e.attr("class",e.attr("class")+" "+n.attr("class")),n.is(":disabled")&&(e.toggleClass("disabled",n.is(":disabled")),n.prop("disabled",!1)),e.toggleClass("checked",n.is(":checked")),n.hide().removeAttr("class").wrap(e).before(t),e=n.parent(),n.on("change",function(t){if(e.hasClass("disabled"))return t.preventDefault();e.toggleClass("checked",s(this).is(":checked"))}),e.on("click",function(t){if(e.hasClass("disabled"))return t.preventDefault();n.is(":enabled")&&e.hasClass("checked")===n.is(":checked")&&n.click()})),n})},s.fn.tiwl_onoffblock=function(t){var n={onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},c=s.extend(!0,{},n,t);return s(this).each(function(){function t(){function t(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){c.onEachElm.call(s(n).toggle(i))})}var n=s(this),i=n.attr("tiwl-show"),e=n.attr("tiwl-hide"),o=c.isChecked.call(n);return"string"==typeof i&&t(i,o),"string"==typeof e&&t(e,!o),n}var n=s(this);return n.is("input")&&"checkbox"==n.attr("type")?(s(this).on("change",t),t.call(n)):n})},s.fn.tiwl_byvalueblock=function(t){var n={onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},i=s.extend(!0,{},n,t);return s(this).each(function(){function t(e){function t(t,i){t=t.match(/[\w\d-\>\.\#\:\=\[\]]+/gim)||[],s.each(t,function(t,n){e.onEachElm.call(s(n).toggle(i))})}var n=s(this),i=n.attr("tiwl-show"),o=n.attr("tiwl-hide"),c=e.onClick.call(n);return"string"==typeof i&&t(i,c),"string"==typeof o&&t(o,!c),n}var n=s(this);return n.is("input")||n.is("select")?(s(this).on("change",function(){t.call(this,i)}),t.call(n,i)):n})};var n=new TInvWL(s);s(document).ready(function(){if(n.Run(),jQuery('input[name="general-show_notice"]').change(function(){var t=!jQuery(this).is(":checked"),n=jQuery('input[name="general-redirect_require_login"]');t&&!n.is(":checked")&&n.click().trigger("change"),n.closest(".tiwlform-onoff-container").toggleClass("disabled",t)}).change(),s(".tablenav").each(function(){var t=s(this);s.trim(t.find(".alignleft").html()).length||t.find(".alignleft").remove(),s.trim(t.find(".alignright").html()).length&&!t.find(".tablenav-pages").hasClass("one-page")||(t.find(".alignright").remove(),t.find(".tinv-wishlist-clear").remove()),s.trim(t.html()).length||t.remove()}),s(".tablenav .bulkactions select").addClass("tinvwl-select grey").wrap('<span class="tinvwl-select-wrap">').parent().append('<span class="tinvwl-caret"><span></span></span>'),s(".tablenav .bulkactions .button.action, .tablenav #search-submit").removeClass("button").addClass("tinvwl-btn grey"),s(".tinvwl-modal-btn").on("click",function(){s(this).next(".tinvwl-modal").addClass("tinvwl-modal-open")}),s(".tinvwl-overlay, .tinvwl-close-modal, .tinvwl_button_close").on("click",function(t){t.preventDefault(),s(this).parents(".tinvwl-modal:first").removeClass("tinvwl-modal-open")}),void 0!==s.fn.popover){var t=s(".tinvwl-help");t.popover({content:function(){return s(this).closest(".tinvwl-info-wrap").find(".tinvwl-info-desc").html()}}),t.on("click",function(){s(this).popover("toggle")}),t.on("focusout",function(){s(this).popover("hide")}),s(window).on("resize",function(){t.popover("hide")})}s("body").on("click",".tinvwl-confirm-reset",function(t){t.preventDefault(),confirm(tinvwl_comfirm.text_comfirm_reset)&&s(this).removeClass("tinvwl-confirm-reset").trigger("click")})})}(jQuery);
assets/js/public.js CHANGED
@@ -170,7 +170,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
170
  formData = new FormData();
171
 
172
  if (tinvwl_add_to_wishlist.wpml) {
173
- data['lang'] = tinvwl_add_to_wishlist.wpml;
174
  }
175
 
176
  $('form.cart[method=post][data-product_id="' + $(this).attr('data-tinv-wl-product') + '"], form.vtajaxform[method=post][data-product_id="' + $(this).attr('data-tinv-wl-product') + '"]').each(function () {
@@ -291,8 +291,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
291
  }
292
  }
293
  } else {
294
- if ('function' === typeof s.onAction['msg']) {
295
- s.onAction['msg'].call(a, body);
296
  }
297
  }
298
  });
@@ -418,7 +418,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
418
  g = '1' == window.tinvwl_add_to_wishlist['simple_flow'];
419
 
420
  for (var i in f) {
421
- if (f[i].hasOwnProperty('in') && Array.isArray(f[i]['in']) && -1 < (f[i]['in'] || []).indexOf(0)) {
422
  j = true;
423
  }
424
  }
@@ -441,7 +441,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
441
  g = '1' == window.tinvwl_add_to_wishlist['simple_flow'];
442
 
443
  for (var i in f) {
444
- if (f[i].hasOwnProperty('in') && Array.isArray(f[i]['in']) && -1 < (f[i]['in'] || []).indexOf(b.variation_id)) {
445
  j = true;
446
  }
447
  }
@@ -458,7 +458,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
458
  if (localStorage.getItem(hash_key)) {
459
  var data = JSON.parse(localStorage.getItem(hash_key));
460
 
461
- if (_typeof(data) === 'object' && data !== null && (data.hasOwnProperty('products') || data.hasOwnProperty('counter'))) {
462
  set_hash(localStorage.getItem(hash_key));
463
  }
464
  }
@@ -468,7 +468,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
468
  var tinvwl_products = [],
469
  tinvwl_counter = false;
470
  $('a.tinvwl_add_to_wishlist_button').each(function () {
471
- if ($(this).data('tinv-wl-product') !== 'undefined' && $(this).data('tinv-wl-product')) {
472
  tinvwl_products.push($(this).data('tinv-wl-product'));
473
  }
474
  });
@@ -485,7 +485,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
485
  };
486
 
487
  if (tinvwl_add_to_wishlist.wpml) {
488
- params['lang'] = tinvwl_add_to_wishlist.wpml;
489
  }
490
 
491
  $.ajax({
@@ -507,7 +507,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
507
  var params = {};
508
 
509
  if (tinvwl_add_to_wishlist.wpml) {
510
- params['lang'] = tinvwl_add_to_wishlist.wpml;
511
  }
512
 
513
  $.ajax({
@@ -535,7 +535,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
535
  if (localStorage.getItem(hash_key)) {
536
  var data = JSON.parse(localStorage.getItem(hash_key));
537
 
538
- if (_typeof(data) === 'object' && data !== null && (data.hasOwnProperty('products') || data.hasOwnProperty('counter'))) {
539
  if (!data.hasOwnProperty('lang') && !tinvwl_add_to_wishlist.wpml || tinvwl_add_to_wishlist.wpml && data.lang === tinvwl_add_to_wishlist.wpml) {
540
  mark_products(data);
541
  return;
@@ -560,15 +560,15 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
560
  mutations.forEach(function (mutation) {
561
  var newNodes = mutation.addedNodes; // If there are new nodes added
562
 
563
- if (newNodes !== null) {
564
  var $nodes = $(newNodes);
565
  $nodes.each(function () {
566
  var $node = $(this),
567
- els = $node.find(".tinvwl_add_to_wishlist_button");
568
 
569
  if (els.length) {
570
  els.each(function () {
571
- if ($(this).data('tinv-wl-product') !== 'undefined' && $(this).data('tinv-wl-product')) {
572
  tinvwl_products.push($(this).data('tinv-wl-product'));
573
  }
574
  });
@@ -595,7 +595,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
595
  hash_key = tinvwl_add_to_wishlist.hash_key;
596
 
597
  try {
598
- $supports_html5_storage = 'sessionStorage' in window && window.sessionStorage !== null;
599
  window.sessionStorage.setItem('ti', 'test');
600
  window.sessionStorage.removeItem('ti');
601
  window.localStorage.setItem('ti', 'test');
@@ -608,7 +608,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
608
  var g = '1' == window.tinvwl_add_to_wishlist['simple_flow'];
609
 
610
  if (g) {
611
- $("a.tinvwl_add_to_wishlist_button").each(function () {
612
  $(this).removeClass('tinvwl-product-make-remove').removeClass('tinvwl-product-already-on-wishlist').removeClass('tinvwl-product-in-list').attr('data-tinv-wl-action', 'addto').attr('data-tinv-wl-list', '[]');
613
  });
614
  }
@@ -623,8 +623,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
623
  j = false;
624
 
625
  for (var i in item) {
626
- if (item[i].hasOwnProperty('in') && Array.isArray(item[i]['in']) && (-1 < (item[i]['in'] || []).indexOf(id) || -1 < (item[i]['in'] || []).indexOf(vid) || vids.some(function (r) {
627
- return (item[i]['in'] || []).indexOf(r) >= 0;
628
  }))) {
629
  j = true;
630
  }
@@ -681,7 +681,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
681
  }
682
  });
683
  $('body').on('click', '.social-buttons .social:not(.social-email,.social-whatsapp,.social-clipboard)', function (e) {
684
- var newWind = window.open($(this).attr('href'), $(this).attr('title'), "width=420,height=320,resizable=yes,scrollbars=yes,status=yes");
685
 
686
  if (newWind) {
687
  newWind.focus();
@@ -689,7 +689,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
689
  }
690
  });
691
 
692
- if (typeof ClipboardJS !== 'undefined') {
693
  var clipboard = new ClipboardJS('.social-buttons .social.social-clipboard', {
694
  text: function text(trigger) {
695
  return trigger.getAttribute('href');
@@ -728,13 +728,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
728
  navigationButton.each(function () {
729
  var navigationButtons = $(this).find('> li');
730
 
731
- if (navigationButtons.length < 5) {
732
  navigationButtons.parent().addClass('tinvwl-btns-count-' + navigationButtons.length);
733
  }
734
  });
735
  }
736
 
737
- $('.tinv-login .showlogin').off("click").on('click', function (e) {
738
  e.preventDefault();
739
  $(this).closest('.tinv-login').find('.login').toggle();
740
  });
@@ -787,10 +787,27 @@ function clearTooltip(e) {
787
  var s = $.extend(true, {}, sd, so);
788
  return $(this).each(function () {
789
  $(this).on('click', function (event) {
790
- if (!s.rule.call($(this))) {
 
 
 
 
 
 
 
 
 
 
791
  alert(window.tinvwl_add_to_wishlist['tinvwl_break_submit']);
792
  event.preventDefault();
793
  }
 
 
 
 
 
 
 
794
  });
795
  });
796
  };
170
  formData = new FormData();
171
 
172
  if (tinvwl_add_to_wishlist.wpml) {
173
+ data.lang = tinvwl_add_to_wishlist.wpml;
174
  }
175
 
176
  $('form.cart[method=post][data-product_id="' + $(this).attr('data-tinv-wl-product') + '"], form.vtajaxform[method=post][data-product_id="' + $(this).attr('data-tinv-wl-product') + '"]').each(function () {
291
  }
292
  }
293
  } else {
294
+ if ('function' === typeof s.onAction.msg) {
295
+ s.onAction.msg.call(a, body);
296
  }
297
  }
298
  });
418
  g = '1' == window.tinvwl_add_to_wishlist['simple_flow'];
419
 
420
  for (var i in f) {
421
+ if (f[i].hasOwnProperty('in') && Array.isArray(f[i].in) && -1 < (f[i].in || []).indexOf(0)) {
422
  j = true;
423
  }
424
  }
441
  g = '1' == window.tinvwl_add_to_wishlist['simple_flow'];
442
 
443
  for (var i in f) {
444
+ if (f[i].hasOwnProperty('in') && Array.isArray(f[i].in) && -1 < (f[i].in || []).indexOf(b.variation_id)) {
445
  j = true;
446
  }
447
  }
458
  if (localStorage.getItem(hash_key)) {
459
  var data = JSON.parse(localStorage.getItem(hash_key));
460
 
461
+ if ('object' === _typeof(data) && null !== data && (data.hasOwnProperty('products') || data.hasOwnProperty('counter'))) {
462
  set_hash(localStorage.getItem(hash_key));
463
  }
464
  }
468
  var tinvwl_products = [],
469
  tinvwl_counter = false;
470
  $('a.tinvwl_add_to_wishlist_button').each(function () {
471
+ if ('undefined' !== $(this).data('tinv-wl-product') && $(this).data('tinv-wl-product')) {
472
  tinvwl_products.push($(this).data('tinv-wl-product'));
473
  }
474
  });
485
  };
486
 
487
  if (tinvwl_add_to_wishlist.wpml) {
488
+ params.lang = tinvwl_add_to_wishlist.wpml;
489
  }
490
 
491
  $.ajax({
507
  var params = {};
508
 
509
  if (tinvwl_add_to_wishlist.wpml) {
510
+ params.lang = tinvwl_add_to_wishlist.wpml;
511
  }
512
 
513
  $.ajax({
535
  if (localStorage.getItem(hash_key)) {
536
  var data = JSON.parse(localStorage.getItem(hash_key));
537
 
538
+ if ('object' === _typeof(data) && null !== data && (data.hasOwnProperty('products') || data.hasOwnProperty('counter'))) {
539
  if (!data.hasOwnProperty('lang') && !tinvwl_add_to_wishlist.wpml || tinvwl_add_to_wishlist.wpml && data.lang === tinvwl_add_to_wishlist.wpml) {
540
  mark_products(data);
541
  return;
560
  mutations.forEach(function (mutation) {
561
  var newNodes = mutation.addedNodes; // If there are new nodes added
562
 
563
+ if (null !== newNodes) {
564
  var $nodes = $(newNodes);
565
  $nodes.each(function () {
566
  var $node = $(this),
567
+ els = $node.find('.tinvwl_add_to_wishlist_button');
568
 
569
  if (els.length) {
570
  els.each(function () {
571
+ if ('undefined' !== $(this).data('tinv-wl-product') && $(this).data('tinv-wl-product')) {
572
  tinvwl_products.push($(this).data('tinv-wl-product'));
573
  }
574
  });
595
  hash_key = tinvwl_add_to_wishlist.hash_key;
596
 
597
  try {
598
+ $supports_html5_storage = 'sessionStorage' in window && null !== window.sessionStorage;
599
  window.sessionStorage.setItem('ti', 'test');
600
  window.sessionStorage.removeItem('ti');
601
  window.localStorage.setItem('ti', 'test');
608
  var g = '1' == window.tinvwl_add_to_wishlist['simple_flow'];
609
 
610
  if (g) {
611
+ $('a.tinvwl_add_to_wishlist_button').each(function () {
612
  $(this).removeClass('tinvwl-product-make-remove').removeClass('tinvwl-product-already-on-wishlist').removeClass('tinvwl-product-in-list').attr('data-tinv-wl-action', 'addto').attr('data-tinv-wl-list', '[]');
613
  });
614
  }
623
  j = false;
624
 
625
  for (var i in item) {
626
+ if (item[i].hasOwnProperty('in') && Array.isArray(item[i].in) && (-1 < (item[i].in || []).indexOf(id) || -1 < (item[i].in || []).indexOf(vid) || vids.some(function (r) {
627
+ return 0 <= (item[i].in || []).indexOf(r);
628
  }))) {
629
  j = true;
630
  }
681
  }
682
  });
683
  $('body').on('click', '.social-buttons .social:not(.social-email,.social-whatsapp,.social-clipboard)', function (e) {
684
+ var newWind = window.open($(this).attr('href'), $(this).attr('title'), 'width=420,height=320,resizable=yes,scrollbars=yes,status=yes');
685
 
686
  if (newWind) {
687
  newWind.focus();
689
  }
690
  });
691
 
692
+ if ('undefined' !== typeof ClipboardJS) {
693
  var clipboard = new ClipboardJS('.social-buttons .social.social-clipboard', {
694
  text: function text(trigger) {
695
  return trigger.getAttribute('href');
728
  navigationButton.each(function () {
729
  var navigationButtons = $(this).find('> li');
730
 
731
+ if (5 > navigationButtons.length) {
732
  navigationButtons.parent().addClass('tinvwl-btns-count-' + navigationButtons.length);
733
  }
734
  });
735
  }
736
 
737
+ $('.tinv-login .showlogin').off('click').on('click', function (e) {
738
  e.preventDefault();
739
  $(this).closest('.tinv-login').find('.login').toggle();
740
  });
787
  var s = $.extend(true, {}, sd, so);
788
  return $(this).each(function () {
789
  $(this).on('click', function (event) {
790
+ var ss = [];
791
+
792
+ if ('undefined' !== typeof $(this).attr('tinvwl_break_submit')) {
793
+ ss = $(this).attr('tinvwl_break_submit').split(',');
794
+ }
795
+
796
+ if (-1 !== jQuery.inArray(s.selector, ss)) {
797
+ ss = [];
798
+ }
799
+
800
+ if (!s.rule.call($(this)) && 0 === ss.length) {
801
  alert(window.tinvwl_add_to_wishlist['tinvwl_break_submit']);
802
  event.preventDefault();
803
  }
804
+
805
+ ss.push(s.selector);
806
+ $(this).attr('tinvwl_break_submit', ss);
807
+
808
+ if (s.rule.call($(this))) {
809
+ $(this).removeAttr('tinvwl_break_submit');
810
+ }
811
  });
812
  });
813
  };
assets/js/public.min.js CHANGED
@@ -1,6 +1,6 @@
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
- * @version 1.24.5
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
- "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function showTooltip(t,i){t.setAttribute("class","social social-clipboard tooltipped tooltipped-s"),t.setAttribute("aria-label",i)}function clearTooltip(t){t.currentTarget.setAttribute("class","social social-clipboard "),t.currentTarget.removeAttribute("aria-label")}!function(c){c.fn.tinvwl_to_wishlist=function(t){var i={api_url:window.location.href.split("?")[0],text_create:window.tinvwl_add_to_wishlist.text_create,text_already_in:window.tinvwl_add_to_wishlist.text_already_in,class:{dialogbox:".tinvwl_add_to_select_wishlist",select:".tinvwl_wishlist",newtitle:".tinvwl_new_input",dialogbutton:".tinvwl_button_add"},redirectTimer:null,onPrepareList:function(){},onGetDialogBox:function(){},onPrepareDialogBox:function(){c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c(this).appendTo("body > .tinv-wishlist")},onCreateWishList:function(t){c(this).append(c("<option>").html(t.title).val(t.ID).toggleClass("tinv_in_wishlist",t.in))},onSelectWishList:function(){},onDialogShow:function(t){c(t).addClass("tinv-modal-open"),c(t).removeClass("ftinvwl-pulse")},onDialogHide:function(t){c(t).removeClass("tinv-modal-open"),c(t).removeClass("ftinvwl-pulse")},onInited:function(){},onClick:function(){if(c(this).is(".disabled-add-wishlist"))return!1;c(this).is(".ftinvwl-animated")&&c(this).addClass("ftinvwl-pulse"),this.tinvwl_dialog?this.tinvwl_dialog.show_list.call(this):e.onActionProduct.call(this)},onPrepareDataAction:function(t,i){c("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){t=t||[];var o={};return c("form.cart[method=post], .woocommerce-variation-add-to-cart, form.vtajaxform[method=post]").find("input, select").each(function(){var t=c(this).attr("name"),i=c(this).attr("type"),n=c(this).val();("checkbox"!==i&&"radio"!==i||c(this).is(":checked"))&&(o["form"+t]=n)}),o=o.formvariation_id,t.filter(function(t){if("object"!==_typeof(t.in)||"string"!=typeof o)return t.in;var i=parseInt(o);return 0<=t.in.indexOf(i)})},onMultiProductAlreadyIn:function(t){t=t||[];t=e.onPrepareList.call(t)||t,t=e.filterProductAlreadyIn.call(this,t)||t,c(this).parent().parent().find(".already-in").remove();var n="";switch(t.length){case 0:break;default:n=c("<ul>");c.each(t,function(t,i){n.append(c("<li>").html(c("<a>").html(i.title).attr({href:i.url})).val(i.ID))})}n.length&&c(this).closest(".tinv-modal-inner").find("img").after(c("<div>").addClass("already-in").html(e.text_already_in+" ").append(n))},onAction:{redirect:function(t){e.redirectTimer&&clearTimeout(e.redirectTimer),e.redirectTimer=window.setTimeout(function(){window.location.href=t},4e3)},force_redirect:function(t){window.location.href=t},wishlists:function(){},msg:function(t){if(!t)return!1;var i=c(t).eq(0);c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove(),e.redirectTimer&&clearTimeout(e.redirectTimer)})},status:function(t){c("body").trigger("tinvwl_wishlist_added_status",[this,t])},removed:function(){},make_remove:function(){},wishlists_data:function(t){d(JSON.stringify(t))}}};i.onActionProduct=function(t,i){var r={form:{},tinv_wishlist_id:t||"",tinv_wishlist_name:i||"",product_type:c(this).attr("data-tinv-wl-producttype"),product_id:c(this).attr("data-tinv-wl-product")||0,product_variation:c(this).attr("data-tinv-wl-productvariation")||0,product_action:c(this).attr("data-tinv-wl-action")||"addto",redirect:window.location.href},n=this,o=[],d=new FormData;tinvwl_add_to_wishlist.wpml&&(r.lang=tinvwl_add_to_wishlist.wpml),c('form.cart[method=post][data-product_id="'+c(this).attr("data-tinv-wl-product")+'"], form.vtajaxform[method=post][data-product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){o.push(c(this))}),o.length||(c(n).closest("form.cart[method=post], form.vtajaxform[method=post]").each(function(){o.push(c(this))}),o.length||o.push(c("form.cart[method=post]"))),c('.tinv-wraper[data-product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){o.push(c(this))}),c.each(o,function(t,i){c(i).find("input:not(:disabled), select:not(:disabled), textarea:not(:disabled)").each(function(){function e(t,i){if("object"!==_typeof(i))return i;for(var n in void 0===t&&(t={}),i)if(""===n){var o=-1;for(o in t)o=o;t[o=parseInt(o)+1]=e(t[n],i[n])}else t[n]=e(t[n],i[n]);return t}var t=c(this).attr("name"),i=c(this).attr("type"),n=c(this).val(),o=10;if("button"!==i&&void 0!==t){for(;/^(.+)\[([^\[\]]*?)\]$/.test(t)&&0<o;){var a=t.match(/^(.+)\[([^\[\]]*?)\]$/);if(3===a.length){var l={};l[a[2]]=n,n=l}t=a[1],o--}if("file"===i){var s=c(this)[0].files;s&&d.append(t,s[0])}"checkbox"===i||"radio"===i?c(this).is(":checked")&&(n.length||"object"===_typeof(n)||(n=!0),r.form[t]=e(r.form[t],n)):r.form[t]=e(r.form[t],n)}})}),r=e.onPrepareDataAction.call(n,n,r)||r,c.each(r,function(n,t){"form"===n?c.each(t,function(t,i){"object"===_typeof(i)&&(i=JSON.stringify(i)),d.append(n+"["+t+"]",i)}):d.append(n,t)}),c.ajax({url:e.api_url,method:"POST",contentType:!1,processData:!1,data:d}).done(function(t){if(e.onDialogHide.call(n.tinvwl_dialog,n),"object"===_typeof(t))for(var i in t)"function"==typeof e.onAction[i]&&e.onAction[i].call(n,t[i]);else"function"==typeof e.onAction.msg&&e.onAction.msg.call(n,t)})};var e=c.extend(!0,{},i,t);return c(this).each(function(){if(!c(this).attr("data-tinv-wl-list"))return!1;if(e.dialogbox&&e.dialogbox.length&&(this.tinvwl_dialog=e.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=e.onGetDialogBox.call(this)),!this.tinvwl_dialog){var t=c(this).nextAll(e.class.dialogbox).eq(0);t.length&&(this.tinvwl_dialog=t)}if(this.tinvwl_dialog){e.onPrepareDialogBox.call(this.tinvwl_dialog),"function"!=typeof this.tinvwl_dialog.update_list&&(this.tinvwl_dialog.update_list=function(t){var n=c(this).find(e.class.select).eq(0);c(this).find(e.class.newtitle).hide().val(""),n.html(""),c.each(t,function(t,i){e.onCreateWishList.call(n,i)}),e.text_create&&e.onCreateWishList.call(n,{ID:"",title:e.text_create,in:!1}),e.onMultiProductAlreadyIn.call(n,t),e.onSelectWishList.call(n,t),c(this).find(e.class.newtitle).toggle(""===n.val())}),"function"!=typeof this.tinvwl_dialog.show_list&&(this.tinvwl_dialog.show_list=function(){var t=JSON.parse(c(this).attr("data-tinv-wl-list"))||[];t.length?(t=e.onPrepareList.call(t)||t,this.tinvwl_dialog.update_list(t),e.onDialogShow.call(this.tinvwl_dialog,this)):e.onActionProduct.call(this)});var o=this;c(this.tinvwl_dialog).find(e.class.dialogbutton).off("click").on("click",function(){var t,i=c(o.tinvwl_dialog).find(e.class.select),n=c(o.tinvwl_dialog).find(e.class.newtitle);i.val()||n.val()?e.onActionProduct.call(o,i.val(),n.val()):((t=n.is(":visible")?n:i).addClass("empty-name-wishlist"),window.setTimeout(function(){t.removeClass("empty-name-wishlist")},1e3))})}c(this).off("click").on("click",e.onClick),e.onInited.call(this,e)})},c(document).ready(function(){c("body").on("click",".tinvwl_add_to_wishlist_button",function(t){if(c("body").trigger("tinvwl_add_to_wishlist_button_click",[this]),c(this).is(".disabled-add-wishlist"))return t.preventDefault(),void window.alert(tinvwl_add_to_wishlist.i18n_make_a_selection_text);c(this).is(".inited-add-wishlist")||c(this).tinvwl_to_wishlist({onInited:function(t){c(this).addClass("inited-add-wishlist"),t.onClick.call(this)}})}),c(document).on("hide_variation",".variations_form",function(t){var i=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(i.attr("data-tinv-wl-productvariation",0),i.length&&i.attr("data-tinv-wl-list")){var n=JSON.parse(i.attr("data-tinv-wl-list")),o=!1,e="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var a in n)n[a].hasOwnProperty("in")&&Array.isArray(n[a].in)&&-1<(n[a].in||[]).indexOf(0)&&(o=!0);i.toggleClass("tinvwl-product-in-list",o).toggleClass("tinvwl-product-make-remove",o&&e).attr("data-tinv-wl-action",o&&e?"remove":"addto")}i.length&&!tinvwl_add_to_wishlist.allow_parent_variable&&(t.preventDefault(),i.addClass("disabled-add-wishlist"))}),c(document).on("show_variation",".variations_form",function(t,i,n){var o=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(o.attr("data-tinv-wl-productvariation",i.variation_id),o.length&&o.attr("data-tinv-wl-list")){var e=JSON.parse(o.attr("data-tinv-wl-list")),a=!1,l="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var s in e)e[s].hasOwnProperty("in")&&Array.isArray(e[s].in)&&-1<(e[s].in||[]).indexOf(i.variation_id)&&(a=!0);o.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&l).attr("data-tinv-wl-action",a&&l?"remove":"addto")}t.preventDefault(),o.removeClass("disabled-add-wishlist")}),c(window).on("storage onstorage",function(t){if(s===t.originalEvent.key&&localStorage.getItem(s)!==sessionStorage.getItem(s)&&localStorage.getItem(s)){var i=JSON.parse(localStorage.getItem(s));"object"===_typeof(i)&&null!==i&&(i.hasOwnProperty("products")||i.hasOwnProperty("counter"))&&d(localStorage.getItem(s))}});var n=[],i=!1;c("a.tinvwl_add_to_wishlist_button").each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&n.push(c(this).data("tinv-wl-product"))}),c(".wishlist_products_counter_number").each(function(){i=!0});function o(){if(n.length||i){var t={};tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),c.ajax({url:tinvwl_add_to_wishlist.plugin_url+"includes/api/ajax.php",method:"POST",data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){d(JSON.stringify(t)),r(t)}).fail(function(){!function(){if(n.length||i){var t={ids:n,counter:i,tinvwl_request:!0};tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),c.ajax({url:tinvwl_add_to_wishlist.rest_root+"wishlist/v1/products",method:"POST",data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){d(JSON.stringify(t)),r(t)})}}()})}}function e(){if(l&&(tinvwl_add_to_wishlist.update_wishlists_data&&localStorage.setItem(s,""),localStorage.getItem(s))){var t=JSON.parse(localStorage.getItem(s));if("object"===_typeof(t)&&null!==t&&(t.hasOwnProperty("products")||t.hasOwnProperty("counter"))&&(!t.hasOwnProperty("lang")&&!tinvwl_add_to_wishlist.wpml||tinvwl_add_to_wishlist.wpml&&t.lang===tinvwl_add_to_wishlist.wpml))return void r(t)}tinvwl_add_to_wishlist.block_ajax_wishlists_data||o()}e();var t=new MutationObserver(function(t){n=[],t.forEach(function(t){var i=t.addedNodes;null!==i&&c(i).each(function(){var t=c(this).find(".tinvwl_add_to_wishlist_button");t.length&&t.each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&n.push(c(this).data("tinv-wl-product"))})})}),n.length&&e()}),a=document.body;t.observe(a,{childList:!0,subtree:!0})});var l=!0,s=tinvwl_add_to_wishlist.hash_key;try{l="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("ti","test"),window.sessionStorage.removeItem("ti"),window.localStorage.setItem("ti","test"),window.localStorage.removeItem("ti")}catch(t){l=!1}function r(t){var l="1"==window.tinvwl_add_to_wishlist.simple_flow;l&&c("a.tinvwl_add_to_wishlist_button").each(function(){c(this).removeClass("tinvwl-product-make-remove").removeClass("tinvwl-product-already-on-wishlist").removeClass("tinvwl-product-in-list").attr("data-tinv-wl-action","addto").attr("data-tinv-wl-list","[]")}),c("body").trigger("tinvwl_wishlist_mark_products",[t]),c.each(t.products,function(t,e){var a=t;c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+a+'"]').each(function(){var t=parseInt(c(this).attr("data-tinv-wl-productvariation")),i=c(this).data("tinv-wl-productvariations")||[],n=!1;for(var o in e)e[o].hasOwnProperty("in")&&Array.isArray(e[o].in)&&(-1<(e[o].in||[]).indexOf(a)||-1<(e[o].in||[]).indexOf(t)||i.some(function(t){return 0<=(e[o].in||[]).indexOf(t)}))&&(n=!0);c("body").trigger("tinvwl_wishlist_product_marked",[this,n]),c(this).attr("data-tinv-wl-list",JSON.stringify(e)).toggleClass("tinvwl-product-in-list",n).toggleClass("tinvwl-product-make-remove",n&&l).attr("data-tinv-wl-action",n&&l?"remove":"addto")})}),function(t){"1"==window.tinvwl_add_to_wishlist.hide_zero_counter&&0===t&&(t="false");jQuery("i.wishlist-icon").addClass("added"),"false"!==t?(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html(t),jQuery("i.wishlist-icon").attr("data-icon-label",t)):(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html("").closest("span.wishlist-counter-with-products").removeClass("wishlist-counter-with-products"),jQuery("i.wishlist-icon").removeAttr("data-icon-label"));var i=!("0"==t||"false"==t);jQuery(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",i),setTimeout(function(){jQuery("i.wishlist-icon").removeClass("added")},500)}(t.counter)}function d(t){l&&(localStorage.setItem(s,t),sessionStorage.setItem(s,t),r(JSON.parse(t)))}}(jQuery),function(o){o(document).ready(function(){if(o("#tinvwl_manage_actions, #tinvwl_product_actions").addClass("form-control").parent().wrapInner('<div class="tinvwl-input-group tinvwl-no-full">').find("button").wrap('<span class="tinvwl-input-group-btn">'),o(".tinv-lists-nav").each(function(){o(this).html().trim().length||o(this).remove()}),o("body").on("click",".social-buttons .social:not(.social-email,.social-whatsapp,.social-clipboard)",function(t){var i=window.open(o(this).attr("href"),o(this).attr("title"),"width=420,height=320,resizable=yes,scrollbars=yes,status=yes");i&&(i.focus(),t.preventDefault())}),"undefined"!=typeof ClipboardJS){new ClipboardJS(".social-buttons .social.social-clipboard",{text:function(t){return t.getAttribute("href")}}).on("success",function(t){showTooltip(t.trigger,tinvwl_add_to_wishlist.tinvwl_clipboard)});for(var t=document.querySelectorAll(".social-buttons .social.social-clipboard"),i=0;i<t.length;i++)t[i].addEventListener("mouseleave",clearTooltip),t[i].addEventListener("blur",clearTooltip)}o("body").on("click",".social-buttons .social.social-clipboard",function(t){t.preventDefault()}),o("body").on("click",".tinv-wishlist .tinv-overlay, .tinv-wishlist .tinv-close-modal, .tinv-wishlist .tinvwl_button_close",function(t){t.preventDefault(),o(this).parents(".tinv-modal:first").removeClass("tinv-modal-open"),o("body").trigger("tinvwl_modal_closed",[this])}),o("body").on("click",".tinv-wishlist .tinvwl-btn-onclick",function(t){o(this).data("url")&&(t.preventDefault(),window.location=o(this).data("url"))});var n=o(".tinv-wishlist .navigation-button");n.length&&n.each(function(){var t=o(this).find("> li");t.length<5&&t.parent().addClass("tinvwl-btns-count-"+t.length)}),o(".tinv-login .showlogin").off("click").on("click",function(t){t.preventDefault(),o(this).closest(".tinv-login").find(".login").toggle()}),o(".tinv-wishlist table.tinvwl-table-manage-list tfoot td").each(function(){o(this).toggle(!!o(this).children().not(".look_in").length||!!o(this).children(".look_in").children().length)})})}(jQuery),function(o){o.fn.tinvwl_break_submit=function(t){var i={selector:"input, select, textarea",ifempty:!0,invert:!1,validate:function(){return o(this).val()},rule:function(){var t=o(this).parents("form").eq(0).find(n.selector),i=n.invert;return 0===t.length?n.ifempty:(t.each(function(){i&&!n.invert||!i&&n.invert||(i=Boolean(n.validate.call(o(this))))}),i)}},n=o.extend(!0,{},i,t);return o(this).each(function(){o(this).on("click",function(t){n.rule.call(o(this))||(alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit),t.preventDefault())})})},o(document).ready(function(){o(".tinvwl-break-input").tinvwl_break_submit({selector:".tinvwl-break-input-filed"}),o(".tinvwl-break-checkbox").tinvwl_break_submit({selector:"table td input[type=checkbox]",validate:function(){return o(this).is(":checked")}}),o(".global-cb").on("click",function(){o(this).closest("table").eq(0).find(".product-cb input[type=checkbox], .wishlist-cb input[type=checkbox]").prop("checked",o(this).is(":checked"))})})}(jQuery);
1
  /**
2
  * TI WooCommerce Wishlist Plugin - Allow your store guests and customers to add products to Wishlist. Add Wishlist functionality to your store for free.
3
+ * @version 1.25.0
4
  * @link https://wordpress.org/plugins/ti-woocommerce-wishlist/
5
  */
6
+ "use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function showTooltip(t,i){t.setAttribute("class","social social-clipboard tooltipped tooltipped-s"),t.setAttribute("aria-label",i)}function clearTooltip(t){t.currentTarget.setAttribute("class","social social-clipboard "),t.currentTarget.removeAttribute("aria-label")}!function(c){c.fn.tinvwl_to_wishlist=function(t){var i={api_url:window.location.href.split("?")[0],text_create:window.tinvwl_add_to_wishlist.text_create,text_already_in:window.tinvwl_add_to_wishlist.text_already_in,class:{dialogbox:".tinvwl_add_to_select_wishlist",select:".tinvwl_wishlist",newtitle:".tinvwl_new_input",dialogbutton:".tinvwl_button_add"},redirectTimer:null,onPrepareList:function(){},onGetDialogBox:function(){},onPrepareDialogBox:function(){c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c(this).appendTo("body > .tinv-wishlist")},onCreateWishList:function(t){c(this).append(c("<option>").html(t.title).val(t.ID).toggleClass("tinv_in_wishlist",t.in))},onSelectWishList:function(){},onDialogShow:function(t){c(t).addClass("tinv-modal-open"),c(t).removeClass("ftinvwl-pulse")},onDialogHide:function(t){c(t).removeClass("tinv-modal-open"),c(t).removeClass("ftinvwl-pulse")},onInited:function(){},onClick:function(){if(c(this).is(".disabled-add-wishlist"))return!1;c(this).is(".ftinvwl-animated")&&c(this).addClass("ftinvwl-pulse"),this.tinvwl_dialog?this.tinvwl_dialog.show_list.call(this):e.onActionProduct.call(this)},onPrepareDataAction:function(t,i){c("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){t=t||[];var o={};return c("form.cart[method=post], .woocommerce-variation-add-to-cart, form.vtajaxform[method=post]").find("input, select").each(function(){var t=c(this).attr("name"),i=c(this).attr("type"),n=c(this).val();("checkbox"!==i&&"radio"!==i||c(this).is(":checked"))&&(o["form"+t]=n)}),o=o.formvariation_id,t.filter(function(t){if("object"!==_typeof(t.in)||"string"!=typeof o)return t.in;var i=parseInt(o);return 0<=t.in.indexOf(i)})},onMultiProductAlreadyIn:function(t){t=t||[];t=e.onPrepareList.call(t)||t,t=e.filterProductAlreadyIn.call(this,t)||t,c(this).parent().parent().find(".already-in").remove();var n="";switch(t.length){case 0:break;default:n=c("<ul>");c.each(t,function(t,i){n.append(c("<li>").html(c("<a>").html(i.title).attr({href:i.url})).val(i.ID))})}n.length&&c(this).closest(".tinv-modal-inner").find("img").after(c("<div>").addClass("already-in").html(e.text_already_in+" ").append(n))},onAction:{redirect:function(t){e.redirectTimer&&clearTimeout(e.redirectTimer),e.redirectTimer=window.setTimeout(function(){window.location.href=t},4e3)},force_redirect:function(t){window.location.href=t},wishlists:function(){},msg:function(t){if(!t)return!1;var i=c(t).eq(0);c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(i),i.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),i.remove(),e.redirectTimer&&clearTimeout(e.redirectTimer)})},status:function(t){c("body").trigger("tinvwl_wishlist_added_status",[this,t])},removed:function(){},make_remove:function(){},wishlists_data:function(t){d(JSON.stringify(t))}}};i.onActionProduct=function(t,i){var r={form:{},tinv_wishlist_id:t||"",tinv_wishlist_name:i||"",product_type:c(this).attr("data-tinv-wl-producttype"),product_id:c(this).attr("data-tinv-wl-product")||0,product_variation:c(this).attr("data-tinv-wl-productvariation")||0,product_action:c(this).attr("data-tinv-wl-action")||"addto",redirect:window.location.href},n=this,o=[],d=new FormData;tinvwl_add_to_wishlist.wpml&&(r.lang=tinvwl_add_to_wishlist.wpml),c('form.cart[method=post][data-product_id="'+c(this).attr("data-tinv-wl-product")+'"], form.vtajaxform[method=post][data-product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){o.push(c(this))}),o.length||(c(n).closest("form.cart[method=post], form.vtajaxform[method=post]").each(function(){o.push(c(this))}),o.length||o.push(c("form.cart[method=post]"))),c('.tinv-wraper[data-product_id="'+c(this).attr("data-tinv-wl-product")+'"]').each(function(){o.push(c(this))}),c.each(o,function(t,i){c(i).find("input:not(:disabled), select:not(:disabled), textarea:not(:disabled)").each(function(){function e(t,i){if("object"!==_typeof(i))return i;for(var n in void 0===t&&(t={}),i)if(""===n){var o=-1;for(o in t)o=o;t[o=parseInt(o)+1]=e(t[n],i[n])}else t[n]=e(t[n],i[n]);return t}var t=c(this).attr("name"),i=c(this).attr("type"),n=c(this).val(),o=10;if("button"!==i&&void 0!==t){for(;/^(.+)\[([^\[\]]*?)\]$/.test(t)&&0<o;){var a=t.match(/^(.+)\[([^\[\]]*?)\]$/);if(3===a.length){var l={};l[a[2]]=n,n=l}t=a[1],o--}if("file"===i){var s=c(this)[0].files;s&&d.append(t,s[0])}"checkbox"===i||"radio"===i?c(this).is(":checked")&&(n.length||"object"===_typeof(n)||(n=!0),r.form[t]=e(r.form[t],n)):r.form[t]=e(r.form[t],n)}})}),r=e.onPrepareDataAction.call(n,n,r)||r,c.each(r,function(n,t){"form"===n?c.each(t,function(t,i){"object"===_typeof(i)&&(i=JSON.stringify(i)),d.append(n+"["+t+"]",i)}):d.append(n,t)}),c.ajax({url:e.api_url,method:"POST",contentType:!1,processData:!1,data:d}).done(function(t){if(e.onDialogHide.call(n.tinvwl_dialog,n),"object"===_typeof(t))for(var i in t)"function"==typeof e.onAction[i]&&e.onAction[i].call(n,t[i]);else"function"==typeof e.onAction.msg&&e.onAction.msg.call(n,t)})};var e=c.extend(!0,{},i,t);return c(this).each(function(){if(!c(this).attr("data-tinv-wl-list"))return!1;if(e.dialogbox&&e.dialogbox.length&&(this.tinvwl_dialog=e.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=e.onGetDialogBox.call(this)),!this.tinvwl_dialog){var t=c(this).nextAll(e.class.dialogbox).eq(0);t.length&&(this.tinvwl_dialog=t)}if(this.tinvwl_dialog){e.onPrepareDialogBox.call(this.tinvwl_dialog),"function"!=typeof this.tinvwl_dialog.update_list&&(this.tinvwl_dialog.update_list=function(t){var n=c(this).find(e.class.select).eq(0);c(this).find(e.class.newtitle).hide().val(""),n.html(""),c.each(t,function(t,i){e.onCreateWishList.call(n,i)}),e.text_create&&e.onCreateWishList.call(n,{ID:"",title:e.text_create,in:!1}),e.onMultiProductAlreadyIn.call(n,t),e.onSelectWishList.call(n,t),c(this).find(e.class.newtitle).toggle(""===n.val())}),"function"!=typeof this.tinvwl_dialog.show_list&&(this.tinvwl_dialog.show_list=function(){var t=JSON.parse(c(this).attr("data-tinv-wl-list"))||[];t.length?(t=e.onPrepareList.call(t)||t,this.tinvwl_dialog.update_list(t),e.onDialogShow.call(this.tinvwl_dialog,this)):e.onActionProduct.call(this)});var o=this;c(this.tinvwl_dialog).find(e.class.dialogbutton).off("click").on("click",function(){var t,i=c(o.tinvwl_dialog).find(e.class.select),n=c(o.tinvwl_dialog).find(e.class.newtitle);i.val()||n.val()?e.onActionProduct.call(o,i.val(),n.val()):((t=n.is(":visible")?n:i).addClass("empty-name-wishlist"),window.setTimeout(function(){t.removeClass("empty-name-wishlist")},1e3))})}c(this).off("click").on("click",e.onClick),e.onInited.call(this,e)})},c(document).ready(function(){c("body").on("click",".tinvwl_add_to_wishlist_button",function(t){if(c("body").trigger("tinvwl_add_to_wishlist_button_click",[this]),c(this).is(".disabled-add-wishlist"))return t.preventDefault(),void window.alert(tinvwl_add_to_wishlist.i18n_make_a_selection_text);c(this).is(".inited-add-wishlist")||c(this).tinvwl_to_wishlist({onInited:function(t){c(this).addClass("inited-add-wishlist"),t.onClick.call(this)}})}),c(document).on("hide_variation",".variations_form",function(t){var i=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(i.attr("data-tinv-wl-productvariation",0),i.length&&i.attr("data-tinv-wl-list")){var n=JSON.parse(i.attr("data-tinv-wl-list")),o=!1,e="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var a in n)n[a].hasOwnProperty("in")&&Array.isArray(n[a].in)&&-1<(n[a].in||[]).indexOf(0)&&(o=!0);i.toggleClass("tinvwl-product-in-list",o).toggleClass("tinvwl-product-make-remove",o&&e).attr("data-tinv-wl-action",o&&e?"remove":"addto")}i.length&&!tinvwl_add_to_wishlist.allow_parent_variable&&(t.preventDefault(),i.addClass("disabled-add-wishlist"))}),c(document).on("show_variation",".variations_form",function(t,i,n){var o=c('.tinvwl_add_to_wishlist_button:not(.tinvwl-loop)[data-tinv-wl-product="'+c(this).data("product_id")+'"]');if(o.attr("data-tinv-wl-productvariation",i.variation_id),o.length&&o.attr("data-tinv-wl-list")){var e=JSON.parse(o.attr("data-tinv-wl-list")),a=!1,l="1"==window.tinvwl_add_to_wishlist.simple_flow;for(var s in e)e[s].hasOwnProperty("in")&&Array.isArray(e[s].in)&&-1<(e[s].in||[]).indexOf(i.variation_id)&&(a=!0);o.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&l).attr("data-tinv-wl-action",a&&l?"remove":"addto")}t.preventDefault(),o.removeClass("disabled-add-wishlist")}),c(window).on("storage onstorage",function(t){if(s===t.originalEvent.key&&localStorage.getItem(s)!==sessionStorage.getItem(s)&&localStorage.getItem(s)){var i=JSON.parse(localStorage.getItem(s));"object"===_typeof(i)&&null!==i&&(i.hasOwnProperty("products")||i.hasOwnProperty("counter"))&&d(localStorage.getItem(s))}});var n=[],i=!1;c("a.tinvwl_add_to_wishlist_button").each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&n.push(c(this).data("tinv-wl-product"))}),c(".wishlist_products_counter_number").each(function(){i=!0});function o(){if(n.length||i){var t={};tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),c.ajax({url:tinvwl_add_to_wishlist.plugin_url+"includes/api/ajax.php",method:"POST",data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){d(JSON.stringify(t)),r(t)}).fail(function(){!function(){if(n.length||i){var t={ids:n,counter:i,tinvwl_request:!0};tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),c.ajax({url:tinvwl_add_to_wishlist.rest_root+"wishlist/v1/products",method:"POST",data:t,beforeSend:function(t){t.setRequestHeader("X-WP-Nonce",tinvwl_add_to_wishlist.nonce)}}).done(function(t){d(JSON.stringify(t)),r(t)})}}()})}}function e(){if(l&&(tinvwl_add_to_wishlist.update_wishlists_data&&localStorage.setItem(s,""),localStorage.getItem(s))){var t=JSON.parse(localStorage.getItem(s));if("object"===_typeof(t)&&null!==t&&(t.hasOwnProperty("products")||t.hasOwnProperty("counter"))&&(!t.hasOwnProperty("lang")&&!tinvwl_add_to_wishlist.wpml||tinvwl_add_to_wishlist.wpml&&t.lang===tinvwl_add_to_wishlist.wpml))return void r(t)}tinvwl_add_to_wishlist.block_ajax_wishlists_data||o()}e();var t=new MutationObserver(function(t){n=[],t.forEach(function(t){var i=t.addedNodes;null!==i&&c(i).each(function(){var t=c(this).find(".tinvwl_add_to_wishlist_button");t.length&&t.each(function(){"undefined"!==c(this).data("tinv-wl-product")&&c(this).data("tinv-wl-product")&&n.push(c(this).data("tinv-wl-product"))})})}),n.length&&e()}),a=document.body;t.observe(a,{childList:!0,subtree:!0})});var l=!0,s=tinvwl_add_to_wishlist.hash_key;try{l="sessionStorage"in window&&null!==window.sessionStorage,window.sessionStorage.setItem("ti","test"),window.sessionStorage.removeItem("ti"),window.localStorage.setItem("ti","test"),window.localStorage.removeItem("ti")}catch(t){l=!1}function r(t){var l="1"==window.tinvwl_add_to_wishlist.simple_flow;l&&c("a.tinvwl_add_to_wishlist_button").each(function(){c(this).removeClass("tinvwl-product-make-remove").removeClass("tinvwl-product-already-on-wishlist").removeClass("tinvwl-product-in-list").attr("data-tinv-wl-action","addto").attr("data-tinv-wl-list","[]")}),c("body").trigger("tinvwl_wishlist_mark_products",[t]),c.each(t.products,function(t,e){var a=t;c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+a+'"]').each(function(){var t=parseInt(c(this).attr("data-tinv-wl-productvariation")),i=c(this).data("tinv-wl-productvariations")||[],n=!1;for(var o in e)e[o].hasOwnProperty("in")&&Array.isArray(e[o].in)&&(-1<(e[o].in||[]).indexOf(a)||-1<(e[o].in||[]).indexOf(t)||i.some(function(t){return 0<=(e[o].in||[]).indexOf(t)}))&&(n=!0);c("body").trigger("tinvwl_wishlist_product_marked",[this,n]),c(this).attr("data-tinv-wl-list",JSON.stringify(e)).toggleClass("tinvwl-product-in-list",n).toggleClass("tinvwl-product-make-remove",n&&l).attr("data-tinv-wl-action",n&&l?"remove":"addto")})}),function(t){"1"==window.tinvwl_add_to_wishlist.hide_zero_counter&&0===t&&(t="false");jQuery("i.wishlist-icon").addClass("added"),"false"!==t?(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html(t),jQuery("i.wishlist-icon").attr("data-icon-label",t)):(jQuery(".wishlist_products_counter_number, body.theme-woostify .wishlist-item-count").html("").closest("span.wishlist-counter-with-products").removeClass("wishlist-counter-with-products"),jQuery("i.wishlist-icon").removeAttr("data-icon-label"));var i=!("0"==t||"false"==t);jQuery(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",i),setTimeout(function(){jQuery("i.wishlist-icon").removeClass("added")},500)}(t.counter)}function d(t){l&&(localStorage.setItem(s,t),sessionStorage.setItem(s,t),r(JSON.parse(t)))}}(jQuery),function(o){o(document).ready(function(){if(o("#tinvwl_manage_actions, #tinvwl_product_actions").addClass("form-control").parent().wrapInner('<div class="tinvwl-input-group tinvwl-no-full">').find("button").wrap('<span class="tinvwl-input-group-btn">'),o(".tinv-lists-nav").each(function(){o(this).html().trim().length||o(this).remove()}),o("body").on("click",".social-buttons .social:not(.social-email,.social-whatsapp,.social-clipboard)",function(t){var i=window.open(o(this).attr("href"),o(this).attr("title"),"width=420,height=320,resizable=yes,scrollbars=yes,status=yes");i&&(i.focus(),t.preventDefault())}),"undefined"!=typeof ClipboardJS){new ClipboardJS(".social-buttons .social.social-clipboard",{text:function(t){return t.getAttribute("href")}}).on("success",function(t){showTooltip(t.trigger,tinvwl_add_to_wishlist.tinvwl_clipboard)});for(var t=document.querySelectorAll(".social-buttons .social.social-clipboard"),i=0;i<t.length;i++)t[i].addEventListener("mouseleave",clearTooltip),t[i].addEventListener("blur",clearTooltip)}o("body").on("click",".social-buttons .social.social-clipboard",function(t){t.preventDefault()}),o("body").on("click",".tinv-wishlist .tinv-overlay, .tinv-wishlist .tinv-close-modal, .tinv-wishlist .tinvwl_button_close",function(t){t.preventDefault(),o(this).parents(".tinv-modal:first").removeClass("tinv-modal-open"),o("body").trigger("tinvwl_modal_closed",[this])}),o("body").on("click",".tinv-wishlist .tinvwl-btn-onclick",function(t){o(this).data("url")&&(t.preventDefault(),window.location=o(this).data("url"))});var n=o(".tinv-wishlist .navigation-button");n.length&&n.each(function(){var t=o(this).find("> li");t.length<5&&t.parent().addClass("tinvwl-btns-count-"+t.length)}),o(".tinv-login .showlogin").off("click").on("click",function(t){t.preventDefault(),o(this).closest(".tinv-login").find(".login").toggle()}),o(".tinv-wishlist table.tinvwl-table-manage-list tfoot td").each(function(){o(this).toggle(!!o(this).children().not(".look_in").length||!!o(this).children(".look_in").children().length)})})}(jQuery),function(o){o.fn.tinvwl_break_submit=function(t){var i={selector:"input, select, textarea",ifempty:!0,invert:!1,validate:function(){return o(this).val()},rule:function(){var t=o(this).parents("form").eq(0).find(n.selector),i=n.invert;return 0===t.length?n.ifempty:(t.each(function(){i&&!n.invert||!i&&n.invert||(i=Boolean(n.validate.call(o(this))))}),i)}},n=o.extend(!0,{},i,t);return o(this).each(function(){o(this).on("click",function(t){var i=[];void 0!==o(this).attr("tinvwl_break_submit")&&(i=o(this).attr("tinvwl_break_submit").split(",")),-1!==jQuery.inArray(n.selector,i)&&(i=[]),n.rule.call(o(this))||0!==i.length||(alert(window.tinvwl_add_to_wishlist.tinvwl_break_submit),t.preventDefault()),i.push(n.selector),o(this).attr("tinvwl_break_submit",i),n.rule.call(o(this))&&o(this).removeAttr("tinvwl_break_submit")})})},o(document).ready(function(){o(".tinvwl-break-input").tinvwl_break_submit({selector:".tinvwl-break-input-filed"}),o(".tinvwl-break-checkbox").tinvwl_break_submit({selector:"table td input[type=checkbox]",validate:function(){return o(this).is(":checked")}}),o(".global-cb").on("click",function(){o(this).closest("table").eq(0).find(".product-cb input[type=checkbox], .wishlist-cb input[type=checkbox]").prop("checked",o(this).is(":checked"))})})}(jQuery);
includes/wizard.class.php CHANGED
@@ -7,14 +7,15 @@
7
  */
8
 
9
  // If this file is called directly, abort.
10
- if ( ! defined( 'ABSPATH' ) ) {
11
  die;
12
  }
13
 
14
  /**
15
  * Wizard installation plugin helper
16
  */
17
- class TInvWL_Wizard {
 
18
 
19
  /**
20
  * Plugin name
@@ -36,28 +37,31 @@ class TInvWL_Wizard {
36
  * @param string $plugin_name Plugin name.
37
  * @param string $version Plugin version.
38
  */
39
- function __construct( $plugin_name, $version ) {
40
- $this->_name = $plugin_name;
 
41
  $this->_version = $version;
42
- if ( apply_filters( 'tinvwl_enable_wizard', true ) ) {
43
  $this->define_hooks();
44
  }
45
- update_option( $this->_name . '_wizard', true );
46
  }
47
 
48
  /**
49
  * Define hooks
50
  */
51
- function define_hooks() {
52
- add_action( 'admin_menu', array( $this, 'action_menu' ) );
53
- add_action( 'admin_init', array( $this, 'wizard' ) );
 
54
  }
55
 
56
  /**
57
  * Create admin page for wizard
58
  */
59
- function action_menu() {
60
- add_dashboard_page( '', '', 'manage_options', 'tinvwl-wizard', '' );
 
61
  }
62
 
63
  /**
@@ -65,52 +69,53 @@ class TInvWL_Wizard {
65
  *
66
  * @return void
67
  */
68
- function wizard() {
69
- $page = filter_input( INPUT_GET, 'page' );
70
- if ( 'tinvwl-wizard' !== $page ) {
 
71
  return;
72
  }
73
 
74
- $this->page = filter_input( INPUT_GET, 'step', FILTER_VALIDATE_INT, array(
75
- 'default' => 0,
76
- 'min_range' => 0,
77
- ) );
78
- if ( empty( $this->page ) ) {
79
  $this->page = 'intro';
80
  }
81
- if ( ! method_exists( $this, __FUNCTION__ . '_' . $this->page ) ) {
82
  $this->page = 'finish';
83
  }
84
- if ( method_exists( $this, __FUNCTION__ . '_' . $this->page ) ) {
85
  $this->method = __FUNCTION__ . '_' . $this->page;
86
  }
87
 
88
  // Run save form.
89
  $referer = wp_get_referer();
90
- if ( $referer ) {
91
- $url_attr = wp_parse_url( $referer );
92
- if ( array_key_exists( 'query', (array) $url_attr ) ) {
93
- parse_str( $url_attr['query'], $url_attr );
94
  } else {
95
  $url_attr['step'] = 0;
96
  }
97
- $url_attr = filter_var_array( $url_attr, array(
98
- 'step' => array(
99
- 'filter' => FILTER_VALIDATE_INT,
100
- 'default' => 0,
101
- 'min_range' => 0,
102
- ),
103
- ) );
104
- if ( empty( $url_attr['step'] ) ) {
105
  $url_attr['step'] = 'intro';
106
  }
107
  $method = __FUNCTION__ . '_' . $url_attr['step'] . '_save';
108
- if ( ! method_exists( $this, $method ) ) {
109
  $method = __FUNCTION__ . '_finish_save';
110
  }
111
- if ( method_exists( $this, $method ) ) {
112
- $nonce = filter_input( 0, '_wpnonce' );
113
- if ( $nonce && wp_verify_nonce( $nonce, sprintf( '%s-setup-%s', $this->_name, $url_attr['step'] ) ) ) {
114
  $this->$method();
115
  }
116
  }
@@ -128,87 +133,98 @@ class TInvWL_Wizard {
128
  *
129
  * @return string
130
  */
131
- private function next_page() {
 
132
  $index = $this->page;
133
- if ( 'finish' === $index ) {
134
  return '';
135
- } elseif ( 'intro' === $index ) {
136
  $index = 0;
137
  }
138
- $index ++;
139
 
140
- return 'index.php?' . http_build_query( array(
141
- 'page' => 'tinvwl-wizard',
142
- 'step' => $index,
143
- ) );
144
  }
145
 
146
  /**
147
  * Output header wizard page
148
  */
149
- function load_header() {
 
150
  $this->enqueue_styles();
151
  $this->enqueue_scripts();
152
  $content = $title = '';
153
- $method = $this->method . '_title';
154
- if ( method_exists( $this, $method ) ) {
155
  $title = $this->$method();
156
  }
157
  $method = $this->method . '_header';
158
- if ( method_exists( $this, $method ) ) {
159
  ob_start();
160
  $this->$method();
161
  $content = ob_get_clean();
162
  }
163
 
164
- TInvWL_View::view( 'header', array(
165
- 'title' => $title,
166
- 'content' => $content,
167
- 'page' => $this->page,
168
- 'list_steps' => $this->get_list_steps(),
169
- ), 'wizard' );
170
  }
171
 
172
  /**
173
  * Load style
174
  */
175
- function enqueue_styles() {
176
- $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
177
- wp_enqueue_style( 'gfonts', ( is_ssl() ? 'https' : 'http' ) . '://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800', '', null, 'all' );
178
- wp_enqueue_style( $this->_name, TINVWL_URL . 'assets/css/admin' . $suffix . '.css', array(), $this->_version, 'all' );
179
- wp_style_add_data( $this->_name, 'rtl', 'replace' );
180
- wp_style_add_data( $this->_name, 'suffix', $suffix );
181
- wp_enqueue_style( $this->_name . '-form', TINVWL_URL . 'assets/css/admin-form' . $suffix . '.css', array(), $this->_version, 'all' );
182
- wp_style_add_data( $this->_name . '-form', 'rtl', 'replace' );
183
- wp_style_add_data( $this->_name . '-form', 'suffix', $suffix );
184
- wp_enqueue_style( $this->_name . '-setup', TINVWL_URL . 'assets/css/admin-setup' . $suffix . '.css', array(
185
- 'dashicons',
186
- 'install',
187
- ), $this->_version, 'all' );
188
- wp_style_add_data( $this->_name . '-setup', 'rtl', 'replace' );
189
- wp_style_add_data( $this->_name . '-setup', 'suffix', $suffix );
 
 
 
 
 
 
 
190
  }
191
 
192
  /**
193
  * Load javascript
194
  */
195
- function enqueue_scripts() {
196
- wp_enqueue_script( $this->_name, TINVWL_URL . 'assets/js/admin.js', array( 'jquery' ), $this->_version, 'all' );
 
197
  }
198
 
199
  /**
200
  * Output content wizard page
201
  */
202
- function load_content() {
 
203
  ?>
204
- <div class="<?php echo esc_attr( sprintf( '%s-content', $this->_name ) ); ?>">
205
- <form method="POST" action="<?php echo esc_url( admin_url( $this->next_page() ) ) ?>">
206
  <?php
207
  $method = $this->method;
208
- if ( method_exists( $this, $method ) ) {
209
  $this->$method();
210
  }
211
- wp_nonce_field( sprintf( '%s-setup-%s', $this->_name, $this->page ) );
212
  ?>
213
  </form>
214
  </div>
@@ -220,26 +236,27 @@ class TInvWL_Wizard {
220
  *
221
  * @return array
222
  */
223
- function get_list_steps() {
224
- $lists = get_class_methods( $this );
225
- foreach ( $lists as $key => $value ) {
226
- if ( ! preg_match( '/^wizard_[^_]+_title$/i', $value ) ) {
227
- unset( $lists[ $key ] );
 
228
  }
229
  }
230
- sort( $lists );
231
 
232
  $steps = array();
233
- foreach ( $lists as $method ) {
234
- $key = preg_replace( '/(^wizard_|_title$)/i', '', $method );
235
- if ( 'intro' == $key ) { // WPCS: loose comparison ok.
236
  $key = 0;
237
- } elseif ( 'finish' == $key ) { // WPCS: loose comparison ok.
238
- $key = count( $lists ) - 1;
239
  }
240
- $steps[ $key ] = $this->$method();
241
  }
242
- ksort( $steps );
243
 
244
  return $steps;
245
  }
@@ -247,19 +264,20 @@ class TInvWL_Wizard {
247
  /**
248
  * Output footer wizard page
249
  */
250
- function load_footer() {
 
251
  $content = '';
252
- $method = $this->method . '_footer';
253
- if ( method_exists( $this, $method ) ) {
254
  ob_start();
255
  $this->$method();
256
  $content = ob_get_clean();
257
  }
258
 
259
- TInvWL_View::view( 'footer', array(
260
- 'content' => $content,
261
- 'page' => $this->page,
262
- ), 'wizard' );
263
  }
264
 
265
  /**
@@ -267,15 +285,17 @@ class TInvWL_Wizard {
267
  *
268
  * @return string
269
  */
270
- function wizard_intro_title() {
271
- return __( 'Introduction', 'ti-woocommerce-wishlist' );
 
272
  }
273
 
274
  /**
275
  * Content intro
276
  */
277
- function wizard_intro() {
278
- TInvWL_View::view( 'intro', array(), 'wizard' );
 
279
  }
280
 
281
  /**
@@ -283,112 +303,115 @@ class TInvWL_Wizard {
283
  *
284
  * @return string
285
  */
286
- function wizard_1_title() {
287
- return __( 'Page Setup', 'ti-woocommerce-wishlist' );
 
288
  }
289
 
290
  /**
291
  * Content step 1
292
  */
293
- function wizard_1() {
 
294
  $title_pages = array(
295
- 'wishlist' => __( 'Wishlist', 'ti-woocommerce-wishlist' ),
296
  );
297
- $lists = get_pages( array( 'number' => 9999999 ) ); // @codingStandardsIgnoreLine WordPress.VIP.RestrictedFunctions.get_pages
298
- $page_list = array(
299
- '' => __( 'Create Automatically', 'ti-woocommerce-wishlist' ),
300
- - 100 => __( 'Create new Page', 'ti-woocommerce-wishlist' ),
301
  );
302
- $page_name = array();
303
- foreach ( $lists as $list ) {
304
- $page_list[ $list->ID ] = $list->post_title;
305
- $page_name[ $list->post_name ] = $list->ID;
306
  }
307
  $data = array(
308
- 'general_default_title_value' => apply_filters( 'tinvwl_default_wishlist_title', tinv_get_option( 'general', 'default_title' ) ),
309
  );
310
- foreach ( $title_pages as $key => $text ) {
311
- $_data['options'] = $page_list;
312
  $_data['new_value'] = $text;
313
- $_data['value'] = tinv_get_option( 'page', $key ) ? tinv_get_option( 'page', $key ) : '';
314
- $_data['error'] = array_key_exists( ( 'wishlist' === $key ? $key : 'wishlist-' . $key ), $page_name );
315
 
316
- $data['page_pages'][ $key ] = $_data;
317
  }
318
- TInvWL_View::view( 'step-page', $data, 'wizard' );
319
  }
320
 
321
  /**
322
  * Save content step 1
323
  */
324
- function wizard_1_save() {
325
- $title_pages = array(
326
- 'wishlist' => __( 'Wishlist', 'ti-woocommerce-wishlist' ),
 
327
  );
328
  $shortcode_pages = array(
329
- 'wishlist' => '[ti_wishlistsview]',
330
  );
331
- $data = array(
332
- 'general_default_title' => FILTER_SANITIZE_STRING,
333
  );
334
- foreach ( array_keys( $title_pages ) as $key ) {
335
- $data[ 'page_' . $key ] = FILTER_VALIDATE_INT;
336
- $data[ 'page_' . $key . '_new' ] = FILTER_SANITIZE_STRING;
337
- $data[ 'page_' . $key . '_auto' ] = FILTER_VALIDATE_BOOLEAN;
338
  }
339
- $data = filter_input_array( INPUT_POST, $data );
340
- if ( ! empty( $data['general_default_title'] ) ) {
341
- tinv_update_option( 'general', 'default_title', $data['general_default_title'] );
342
  }
343
 
344
- $required = array( 'wishlist' );
345
  $required_notsets = array();
346
- foreach ( $title_pages as $key => $title ) {
347
- $shortcode = $shortcode_pages[ $key ];
348
- $auto = $data[ sprintf( 'page_%s_auto', $key ) ];
349
- $title_new = $data[ sprintf( 'page_%s_new', $key ) ];
350
- $page = $data[ sprintf( 'page_%s', $key ) ];
351
 
352
  $the_page_id = 0;
353
- if ( ( empty( $page ) && $auto ) || ( is_integer( $page ) && - 100 === $page ) ) {
354
- if ( - 100 === $page ) {
355
- $title = empty( $title_new ) ? $title : $title_new;
356
  }
357
- $title = apply_filters( 'tinvwl_create_new_page_post_title', $title, $key );
358
 
359
  $_page = array(
360
- 'post_title' => $title,
361
- 'post_content' => $shortcode,
362
- 'post_status' => '',
363
- 'post_name' => 'wishlist' === $key ? $key : 'wishlist-' . $key,
364
- 'post_type' => 'page',
365
- 'comment_status' => 'closed',
366
- 'ping_status' => 'closed',
367
- 'post_category' => array( 1 ),
368
  );
369
- if ( - 100 === $page ) {
370
- unset( $_page['post_name'] );
371
  }
372
- $the_page_id = wp_insert_post( $_page );
373
- } elseif ( is_integer( $page ) && 0 < $page ) {
374
  $the_page_id = $page;
375
  }
376
 
377
- if ( 0 < $the_page_id ) {
378
- $the_page = get_post( $the_page_id );
379
- $the_page->post_content = ( strpos( $the_page->post_content, $shortcode ) !== false ) ? $the_page->post_content : $shortcode . $the_page->post_content;
380
- $the_page->post_status = 'publish';
381
- $the_page_id = wp_update_post( $the_page );
382
- tinv_update_option( 'page', $key, $the_page_id );
383
  } else {
384
- tinv_update_option( 'page', $key, '' );
385
- if ( in_array( $key, $required ) ) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
386
  $required_notsets[] = $key;
387
  }
388
  }
389
  } // End foreach().
390
- if ( ! empty( $required_notsets ) ) {
391
- wp_safe_redirect( wp_get_referer() );
392
  exit;
393
  } else {
394
  TInvWL_Public_TInvWL::update_rewrite_rules();
@@ -400,43 +423,46 @@ class TInvWL_Wizard {
400
  *
401
  * @return string
402
  */
403
- function wizard_2_title() {
404
- return __( 'Button', 'ti-woocommerce-wishlist' );
 
405
  }
406
 
407
  /**
408
  * Content step 2
409
  */
410
- function wizard_2() {
 
411
 
412
  $data = array(
413
- 'add_to_wishlist_position_value' => tinv_get_option( 'add_to_wishlist', 'position' ),
414
- 'add_to_wishlist_position_options' => array(
415
- 'after' => __( 'After "Add to Cart" button', 'ti-woocommerce-wishlist' ),
416
- 'before' => __( 'Before "Add to Cart" button', 'ti-woocommerce-wishlist' ),
417
- 'shortcode' => __( 'Custom position with code', 'ti-woocommerce-wishlist' ),
418
- ),
419
- 'add_to_wishlist_text_value' => tinv_get_option( 'add_to_wishlist', 'text' ),
420
- 'add_to_wishlist_catalog_show_in_loop_value' => tinv_get_option( 'add_to_wishlist_catalog', 'show_in_loop' ),
421
- 'add_to_wishlist_catalog_text_value' => tinv_get_option( 'add_to_wishlist_catalog', 'text' ),
422
  );
423
- TInvWL_View::view( 'step-button', $data, 'wizard' );
424
  }
425
 
426
  /**
427
  * Save content step 2
428
  */
429
- function wizard_2_save() {
430
- $data = filter_input_array( INPUT_POST, array(
431
- 'add_to_wishlist_position' => FILTER_SANITIZE_STRING,
432
- 'add_to_wishlist_text' => FILTER_SANITIZE_STRING,
433
- 'add_to_wishlist_catalog_show_in_loop' => FILTER_VALIDATE_BOOLEAN,
434
- 'add_to_wishlist_catalog_text' => FILTER_SANITIZE_STRING,
435
- ) );
436
- tinv_update_option( 'add_to_wishlist', 'position', $data['add_to_wishlist_position'] );
437
- tinv_update_option( 'add_to_wishlist', 'text', $data['add_to_wishlist_text'] );
438
- tinv_update_option( 'add_to_wishlist_catalog', 'show_in_loop', (bool) $data['add_to_wishlist_catalog_show_in_loop'] );
439
- tinv_update_option( 'add_to_wishlist_catalog', 'text', $data['add_to_wishlist_catalog_text'] );
 
440
  }
441
 
442
  /**
@@ -444,34 +470,37 @@ class TInvWL_Wizard {
444
  *
445
  * @return string
446
  */
447
- function wizard_3_title() {
448
- return __( 'Processing', 'ti-woocommerce-wishlist' );
 
449
  }
450
 
451
  /**
452
  * Content step 3
453
  */
454
- function wizard_3() {
 
455
  $data = array(
456
- 'processing_autoremove_value' => tinv_get_option( 'processing', 'autoremove' ) ? 'auto' : 'manual',
457
- 'processing_autoremove_options' => array(
458
- 'auto' => __( 'Automatically', 'ti-woocommerce-wishlist' ),
459
- 'manual' => __( 'Manual', 'ti-woocommerce-wishlist' ),
460
- ),
461
  );
462
- TInvWL_View::view( 'step-processing', $data, 'wizard' );
463
  }
464
 
465
  /**
466
  * Save content step 3
467
  */
468
- function wizard_3_save() {
469
- $data = filter_input_array( INPUT_POST, array(
470
- 'processing_autoremove' => FILTER_SANITIZE_STRING,
471
- ) );
 
472
  $autoremove = 'auto' === $data['processing_autoremove'];
473
- tinv_update_option( 'processing', 'autoremove', $autoremove );
474
- tinv_update_option( 'processing', 'autoremove_status', 'tinvwl-addcart' );
475
  }
476
 
477
  /**
@@ -479,43 +508,78 @@ class TInvWL_Wizard {
479
  *
480
  * @return string
481
  */
482
- function wizard_4_title() {
483
- return __( 'Share', 'ti-woocommerce-wishlist' );
 
484
  }
485
 
486
  /**
487
  * Content step 4
488
  */
489
- function wizard_4() {
 
490
  $data = array(
491
- 'social_facebook_value' => tinv_get_option( 'social', 'facebook' ),
492
- 'social_twitter_value' => tinv_get_option( 'social', 'twitter' ),
493
- 'social_pinterest_value' => tinv_get_option( 'social', 'pinterest' ),
494
- 'social_whatsapp_value' => tinv_get_option( 'social', 'whatsapp' ),
495
- 'social_clipboard_value' => tinv_get_option( 'social', 'clipboard' ),
496
- 'social_email_value' => tinv_get_option( 'social', 'email' ),
497
  );
498
- TInvWL_View::view( 'step-social', $data, 'wizard' );
499
  }
500
 
501
  /**
502
  * Save content step 4
503
  */
504
- function wizard_4_save() {
505
- $data = filter_input_array( INPUT_POST, array(
506
- 'social_facebook' => FILTER_VALIDATE_BOOLEAN,
507
- 'social_twitter' => FILTER_VALIDATE_BOOLEAN,
508
- 'social_pinterest' => FILTER_VALIDATE_BOOLEAN,
509
- 'social_whatsapp' => FILTER_VALIDATE_BOOLEAN,
510
- 'social_clipboard' => FILTER_VALIDATE_BOOLEAN,
511
- 'social_email' => FILTER_VALIDATE_BOOLEAN,
512
- ) );
513
- tinv_update_option( 'social', 'facebook', (bool) $data['social_facebook'] );
514
- tinv_update_option( 'social', 'twitter', (bool) $data['social_twitter'] );
515
- tinv_update_option( 'social', 'pinterest', (bool) $data['social_pinterest'] );
516
- tinv_update_option( 'social', 'whatsapp', (bool) $data['social_whatsapp'] );
517
- tinv_update_option( 'social', 'clipboard', (bool) $data['social_clipboard'] );
518
- tinv_update_option( 'social', 'email', (bool) $data['social_email'] );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
519
  }
520
 
521
  /**
@@ -523,14 +587,16 @@ class TInvWL_Wizard {
523
  *
524
  * @return string
525
  */
526
- function wizard_finish_title() {
527
- return __( 'Ready!', 'ti-woocommerce-wishlist' );
 
528
  }
529
 
530
  /**
531
  * Content finish
532
  */
533
- function wizard_finish() {
534
- TInvWL_View::view( 'finish', array(), 'wizard' );
 
535
  }
536
  }
7
  */
8
 
9
  // If this file is called directly, abort.
10
+ if (!defined('ABSPATH')) {
11
  die;
12
  }
13
 
14
  /**
15
  * Wizard installation plugin helper
16
  */
17
+ class TInvWL_Wizard
18
+ {
19
 
20
  /**
21
  * Plugin name
37
  * @param string $plugin_name Plugin name.
38
  * @param string $version Plugin version.
39
  */
40
+ function __construct($plugin_name, $version)
41
+ {
42
+ $this->_name = $plugin_name;
43
  $this->_version = $version;
44
+ if (apply_filters('tinvwl_enable_wizard', true)) {
45
  $this->define_hooks();
46
  }
47
+ update_option($this->_name . '_wizard', true);
48
  }
49
 
50
  /**
51
  * Define hooks
52
  */
53
+ function define_hooks()
54
+ {
55
+ add_action('admin_menu', array($this, 'action_menu'));
56
+ add_action('admin_init', array($this, 'wizard'));
57
  }
58
 
59
  /**
60
  * Create admin page for wizard
61
  */
62
+ function action_menu()
63
+ {
64
+ add_dashboard_page('', '', 'manage_options', 'tinvwl-wizard', '');
65
  }
66
 
67
  /**
69
  *
70
  * @return void
71
  */
72
+ function wizard()
73
+ {
74
+ $page = filter_input(INPUT_GET, 'page');
75
+ if ('tinvwl-wizard' !== $page) {
76
  return;
77
  }
78
 
79
+ $this->page = filter_input(INPUT_GET, 'step', FILTER_VALIDATE_INT, array(
80
+ 'default' => 0,
81
+ 'min_range' => 0,
82
+ ));
83
+ if (empty($this->page)) {
84
  $this->page = 'intro';
85
  }
86
+ if (!method_exists($this, __FUNCTION__ . '_' . $this->page)) {
87
  $this->page = 'finish';
88
  }
89
+ if (method_exists($this, __FUNCTION__ . '_' . $this->page)) {
90
  $this->method = __FUNCTION__ . '_' . $this->page;
91
  }
92
 
93
  // Run save form.
94
  $referer = wp_get_referer();
95
+ if ($referer) {
96
+ $url_attr = wp_parse_url($referer);
97
+ if (array_key_exists('query', (array)$url_attr)) {
98
+ parse_str($url_attr['query'], $url_attr);
99
  } else {
100
  $url_attr['step'] = 0;
101
  }
102
+ $url_attr = filter_var_array($url_attr, array(
103
+ 'step' => array(
104
+ 'filter' => FILTER_VALIDATE_INT,
105
+ 'default' => 0,
106
+ 'min_range' => 0,
107
+ ),
108
+ ));
109
+ if (empty($url_attr['step'])) {
110
  $url_attr['step'] = 'intro';
111
  }
112
  $method = __FUNCTION__ . '_' . $url_attr['step'] . '_save';
113
+ if (!method_exists($this, $method)) {
114
  $method = __FUNCTION__ . '_finish_save';
115
  }
116
+ if (method_exists($this, $method)) {
117
+ $nonce = filter_input(0, '_wpnonce');
118
+ if ($nonce && wp_verify_nonce($nonce, sprintf('%s-setup-%s', $this->_name, $url_attr['step']))) {
119
  $this->$method();
120
  }
121
  }
133
  *
134
  * @return string
135
  */
136
+ private function next_page()
137
+ {
138
  $index = $this->page;
139
+ if ('finish' === $index) {
140
  return '';
141
+ } elseif ('intro' === $index) {
142
  $index = 0;
143
  }
144
+ $index++;
145
 
146
+ return 'index.php?' . http_build_query(array(
147
+ 'page' => 'tinvwl-wizard',
148
+ 'step' => $index,
149
+ ));
150
  }
151
 
152
  /**
153
  * Output header wizard page
154
  */
155
+ function load_header()
156
+ {
157
  $this->enqueue_styles();
158
  $this->enqueue_scripts();
159
  $content = $title = '';
160
+ $method = $this->method . '_title';
161
+ if (method_exists($this, $method)) {
162
  $title = $this->$method();
163
  }
164
  $method = $this->method . '_header';
165
+ if (method_exists($this, $method)) {
166
  ob_start();
167
  $this->$method();
168
  $content = ob_get_clean();
169
  }
170
 
171
+ TInvWL_View::view('header', array(
172
+ 'title' => $title,
173
+ 'content' => $content,
174
+ 'page' => $this->page,
175
+ 'list_steps' => $this->get_list_steps(),
176
+ ), 'wizard');
177
  }
178
 
179
  /**
180
  * Load style
181
  */
182
+ function enqueue_styles()
183
+ {
184
+ $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
185
+
186
+ if (apply_filters('tinvwl_load_webfont', true)) {
187
+ wp_enqueue_style($this->_name . '-gfonts', (is_ssl() ? 'https' : 'http') . '://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800', '', null, 'all');
188
+ wp_enqueue_style($this->_name . '-webfont', TINVWL_URL . 'assets/css/webfont' . $suffix . '.css', array(), $this->_version, 'all');
189
+ wp_style_add_data($this->_name . '-webfont', 'rtl', 'replace');
190
+ wp_style_add_data($this->_name . '-webfont', 'suffix', $suffix);
191
+ }
192
+
193
+ wp_enqueue_style($this->_name, TINVWL_URL . 'assets/css/admin' . $suffix . '.css', array(), $this->_version, 'all');
194
+ wp_style_add_data($this->_name, 'rtl', 'replace');
195
+ wp_style_add_data($this->_name, 'suffix', $suffix);
196
+ wp_enqueue_style($this->_name . '-form', TINVWL_URL . 'assets/css/admin-form' . $suffix . '.css', array(), $this->_version, 'all');
197
+ wp_style_add_data($this->_name . '-form', 'rtl', 'replace');
198
+ wp_style_add_data($this->_name . '-form', 'suffix', $suffix);
199
+ wp_enqueue_style($this->_name . '-setup', TINVWL_URL . 'assets/css/admin-setup' . $suffix . '.css', array(
200
+ 'dashicons',
201
+ ), $this->_version, 'all');
202
+ wp_style_add_data($this->_name . '-setup', 'rtl', 'replace');
203
+ wp_style_add_data($this->_name . '-setup', 'suffix', $suffix);
204
  }
205
 
206
  /**
207
  * Load javascript
208
  */
209
+ function enqueue_scripts()
210
+ {
211
+ wp_enqueue_script($this->_name, TINVWL_URL . 'assets/js/admin.js', array('jquery'), $this->_version, 'all');
212
  }
213
 
214
  /**
215
  * Output content wizard page
216
  */
217
+ function load_content()
218
+ {
219
  ?>
220
+ <div class="<?php echo esc_attr(sprintf('%s-content', $this->_name)); ?>">
221
+ <form method="POST" action="<?php echo esc_url(admin_url($this->next_page())) ?>">
222
  <?php
223
  $method = $this->method;
224
+ if (method_exists($this, $method)) {
225
  $this->$method();
226
  }
227
+ wp_nonce_field(sprintf('%s-setup-%s', $this->_name, $this->page));
228
  ?>
229
  </form>
230
  </div>
236
  *
237
  * @return array
238
  */
239
+ function get_list_steps()
240
+ {
241
+ $lists = get_class_methods($this);
242
+ foreach ($lists as $key => $value) {
243
+ if (!preg_match('/^wizard_[^_]+_title$/i', $value)) {
244
+ unset($lists[$key]);
245
  }
246
  }
247
+ sort($lists);
248
 
249
  $steps = array();
250
+ foreach ($lists as $method) {
251
+ $key = preg_replace('/(^wizard_|_title$)/i', '', $method);
252
+ if ('intro' == $key) { // WPCS: loose comparison ok.
253
  $key = 0;
254
+ } elseif ('finish' == $key) { // WPCS: loose comparison ok.
255
+ $key = count($lists) - 1;
256
  }
257
+ $steps[$key] = $this->$method();
258
  }
259
+ ksort($steps);
260
 
261
  return $steps;
262
  }
264
  /**
265
  * Output footer wizard page
266
  */
267
+ function load_footer()
268
+ {
269
  $content = '';
270
+ $method = $this->method . '_footer';
271
+ if (method_exists($this, $method)) {
272
  ob_start();
273
  $this->$method();
274
  $content = ob_get_clean();
275
  }
276
 
277
+ TInvWL_View::view('footer', array(
278
+ 'content' => $content,
279
+ 'page' => $this->page,
280
+ ), 'wizard');
281
  }
282
 
283
  /**
285
  *
286
  * @return string
287
  */
288
+ function wizard_intro_title()
289
+ {
290
+ return __('Introduction', 'ti-woocommerce-wishlist');
291
  }
292
 
293
  /**
294
  * Content intro
295
  */
296
+ function wizard_intro()
297
+ {
298
+ TInvWL_View::view('intro', array(), 'wizard');
299
  }
300
 
301
  /**
303
  *
304
  * @return string
305
  */
306
+ function wizard_1_title()
307
+ {
308
+ return __('Page Setup', 'ti-woocommerce-wishlist');
309
  }
310
 
311
  /**
312
  * Content step 1
313
  */
314
+ function wizard_1()
315
+ {
316
  $title_pages = array(
317
+ 'wishlist' => __('Wishlist', 'ti-woocommerce-wishlist'),
318
  );
319
+ $lists = get_pages(array('number' => 9999999)); // @codingStandardsIgnoreLine WordPress.VIP.RestrictedFunctions.get_pages
320
+ $page_list = array(
321
+ '' => __('Create Automatically', 'ti-woocommerce-wishlist'),
322
+ -100 => __('Create new Page', 'ti-woocommerce-wishlist'),
323
  );
324
+ $page_name = array();
325
+ foreach ($lists as $list) {
326
+ $page_list[$list->ID] = $list->post_title;
327
+ $page_name[$list->post_name] = $list->ID;
328
  }
329
  $data = array(
330
+ 'general_default_title_value' => apply_filters('tinvwl_default_wishlist_title', tinv_get_option('general', 'default_title')),
331
  );
332
+ foreach ($title_pages as $key => $text) {
333
+ $_data['options'] = $page_list;
334
  $_data['new_value'] = $text;
335
+ $_data['value'] = tinv_get_option('page', $key) ? tinv_get_option('page', $key) : '';
336
+ $_data['error'] = array_key_exists(('wishlist' === $key ? $key : 'wishlist-' . $key), $page_name);
337
 
338
+ $data['page_pages'][$key] = $_data;
339
  }
340
+ TInvWL_View::view('step-page', $data, 'wizard');
341
  }
342
 
343
  /**
344
  * Save content step 1
345
  */
346
+ function wizard_1_save()
347
+ {
348
+ $title_pages = array(
349
+ 'wishlist' => __('Wishlist', 'ti-woocommerce-wishlist'),
350
  );
351
  $shortcode_pages = array(
352
+ 'wishlist' => '[ti_wishlistsview]',
353
  );
354
+ $data = array(
355
+ 'general_default_title' => FILTER_SANITIZE_STRING,
356
  );
357
+ foreach (array_keys($title_pages) as $key) {
358
+ $data['page_' . $key] = FILTER_VALIDATE_INT;
359
+ $data['page_' . $key . '_new'] = FILTER_SANITIZE_STRING;
360
+ $data['page_' . $key . '_auto'] = FILTER_VALIDATE_BOOLEAN;
361
  }
362
+ $data = filter_input_array(INPUT_POST, $data);
363
+ if (!empty($data['general_default_title'])) {
364
+ tinv_update_option('general', 'default_title', $data['general_default_title']);
365
  }
366
 
367
+ $required = array('wishlist');
368
  $required_notsets = array();
369
+ foreach ($title_pages as $key => $title) {
370
+ $shortcode = $shortcode_pages[$key];
371
+ $auto = $data[sprintf('page_%s_auto', $key)];
372
+ $title_new = $data[sprintf('page_%s_new', $key)];
373
+ $page = $data[sprintf('page_%s', $key)];
374
 
375
  $the_page_id = 0;
376
+ if ((empty($page) && $auto) || (is_integer($page) && -100 === $page)) {
377
+ if (-100 === $page) {
378
+ $title = empty($title_new) ? $title : $title_new;
379
  }
380
+ $title = apply_filters('tinvwl_create_new_page_post_title', $title, $key);
381
 
382
  $_page = array(
383
+ 'post_title' => $title,
384
+ 'post_content' => $shortcode,
385
+ 'post_status' => '',
386
+ 'post_name' => 'wishlist' === $key ? $key : 'wishlist-' . $key,
387
+ 'post_type' => 'page',
388
+ 'comment_status' => 'closed',
389
+ 'ping_status' => 'closed',
390
+ 'post_category' => array(1),
391
  );
392
+ if (-100 === $page) {
393
+ unset($_page['post_name']);
394
  }
395
+ $the_page_id = wp_insert_post($_page);
396
+ } elseif (is_integer($page) && 0 < $page) {
397
  $the_page_id = $page;
398
  }
399
 
400
+ if (0 < $the_page_id) {
401
+ $the_page = get_post($the_page_id);
402
+ $the_page->post_content = (strpos($the_page->post_content, $shortcode) !== false) ? $the_page->post_content : $shortcode . $the_page->post_content;
403
+ $the_page->post_status = 'publish';
404
+ $the_page_id = wp_update_post($the_page);
405
+ tinv_update_option('page', $key, $the_page_id);
406
  } else {
407
+ tinv_update_option('page', $key, '');
408
+ if (in_array($key, $required)) { // @codingStandardsIgnoreLine WordPress.PHP.StrictInArray.MissingTrueStrict
409
  $required_notsets[] = $key;
410
  }
411
  }
412
  } // End foreach().
413
+ if (!empty($required_notsets)) {
414
+ wp_safe_redirect(wp_get_referer());
415
  exit;
416
  } else {
417
  TInvWL_Public_TInvWL::update_rewrite_rules();
423
  *
424
  * @return string
425
  */
426
+ function wizard_2_title()
427
+ {
428
+ return __('Button', 'ti-woocommerce-wishlist');
429
  }
430
 
431
  /**
432
  * Content step 2
433
  */
434
+ function wizard_2()
435
+ {
436
 
437
  $data = array(
438
+ 'add_to_wishlist_position_value' => tinv_get_option('add_to_wishlist', 'position'),
439
+ 'add_to_wishlist_position_options' => array(
440
+ 'after' => __('After "Add to Cart" button', 'ti-woocommerce-wishlist'),
441
+ 'before' => __('Before "Add to Cart" button', 'ti-woocommerce-wishlist'),
442
+ 'shortcode' => __('Custom position with code', 'ti-woocommerce-wishlist'),
443
+ ),
444
+ 'add_to_wishlist_text_value' => tinv_get_option('add_to_wishlist', 'text'),
445
+ 'add_to_wishlist_catalog_show_in_loop_value' => tinv_get_option('add_to_wishlist_catalog', 'show_in_loop'),
446
+ 'add_to_wishlist_catalog_text_value' => tinv_get_option('add_to_wishlist_catalog', 'text'),
447
  );
448
+ TInvWL_View::view('step-button', $data, 'wizard');
449
  }
450
 
451
  /**
452
  * Save content step 2
453
  */
454
+ function wizard_2_save()
455
+ {
456
+ $data = filter_input_array(INPUT_POST, array(
457
+ 'add_to_wishlist_position' => FILTER_SANITIZE_STRING,
458
+ 'add_to_wishlist_text' => FILTER_SANITIZE_STRING,
459
+ 'add_to_wishlist_catalog_show_in_loop' => FILTER_VALIDATE_BOOLEAN,
460
+ 'add_to_wishlist_catalog_text' => FILTER_SANITIZE_STRING,
461
+ ));
462
+ tinv_update_option('add_to_wishlist', 'position', $data['add_to_wishlist_position']);
463
+ tinv_update_option('add_to_wishlist', 'text', $data['add_to_wishlist_text']);
464
+ tinv_update_option('add_to_wishlist_catalog', 'show_in_loop', (bool)$data['add_to_wishlist_catalog_show_in_loop']);
465
+ tinv_update_option('add_to_wishlist_catalog', 'text', $data['add_to_wishlist_catalog_text']);
466
  }
467
 
468
  /**
470
  *
471
  * @return string
472
  */
473
+ function wizard_3_title()
474
+ {
475
+ return __('Processing', 'ti-woocommerce-wishlist');
476
  }
477
 
478
  /**
479
  * Content step 3
480
  */
481
+ function wizard_3()
482
+ {
483
  $data = array(
484
+ 'processing_autoremove_value' => tinv_get_option('processing', 'autoremove') ? 'auto' : 'manual',
485
+ 'processing_autoremove_options' => array(
486
+ 'auto' => __('Automatically', 'ti-woocommerce-wishlist'),
487
+ 'manual' => __('Manual', 'ti-woocommerce-wishlist'),
488
+ ),
489
  );
490
+ TInvWL_View::view('step-processing', $data, 'wizard');
491
  }
492
 
493
  /**
494
  * Save content step 3
495
  */
496
+ function wizard_3_save()
497
+ {
498
+ $data = filter_input_array(INPUT_POST, array(
499
+ 'processing_autoremove' => FILTER_SANITIZE_STRING,
500
+ ));
501
  $autoremove = 'auto' === $data['processing_autoremove'];
502
+ tinv_update_option('processing', 'autoremove', $autoremove);
503
+ tinv_update_option('processing', 'autoremove_status', 'tinvwl-addcart');
504
  }
505
 
506
  /**
508
  *
509
  * @return string
510
  */
511
+ function wizard_4_title()
512
+ {
513
+ return __('Share', 'ti-woocommerce-wishlist');
514
  }
515
 
516
  /**
517
  * Content step 4
518
  */
519
+ function wizard_4()
520
+ {
521
  $data = array(
522
+ 'social_facebook_value' => tinv_get_option('social', 'facebook'),
523
+ 'social_twitter_value' => tinv_get_option('social', 'twitter'),
524
+ 'social_pinterest_value' => tinv_get_option('social', 'pinterest'),
525
+ 'social_whatsapp_value' => tinv_get_option('social', 'whatsapp'),
526
+ 'social_clipboard_value' => tinv_get_option('social', 'clipboard'),
527
+ 'social_email_value' => tinv_get_option('social', 'email'),
528
  );
529
+ TInvWL_View::view('step-social', $data, 'wizard');
530
  }
531
 
532
  /**
533
  * Save content step 4
534
  */
535
+ function wizard_4_save()
536
+ {
537
+ $data = filter_input_array(INPUT_POST, array(
538
+ 'social_facebook' => FILTER_VALIDATE_BOOLEAN,
539
+ 'social_twitter' => FILTER_VALIDATE_BOOLEAN,
540
+ 'social_pinterest' => FILTER_VALIDATE_BOOLEAN,
541
+ 'social_whatsapp' => FILTER_VALIDATE_BOOLEAN,
542
+ 'social_clipboard' => FILTER_VALIDATE_BOOLEAN,
543
+ 'social_email' => FILTER_VALIDATE_BOOLEAN,
544
+ ));
545
+ tinv_update_option('social', 'facebook', (bool)$data['social_facebook']);
546
+ tinv_update_option('social', 'twitter', (bool)$data['social_twitter']);
547
+ tinv_update_option('social', 'pinterest', (bool)$data['social_pinterest']);
548
+ tinv_update_option('social', 'whatsapp', (bool)$data['social_whatsapp']);
549
+ tinv_update_option('social', 'clipboard', (bool)$data['social_clipboard']);
550
+ tinv_update_option('social', 'email', (bool)$data['social_email']);
551
+ }
552
+
553
+ /**
554
+ * Title step 5
555
+ *
556
+ * @return string
557
+ */
558
+ function wizard_5_title()
559
+ {
560
+ return __('Support', 'ti-woocommerce-wishlist');
561
+ }
562
+
563
+ /**
564
+ * Content step 5
565
+ */
566
+ function wizard_5()
567
+ {
568
+ $data = array(
569
+ 'chat_enabled' => 'on',
570
+ );
571
+ TInvWL_View::view('step-support', $data, 'wizard');
572
+ }
573
+
574
+ /**
575
+ * Save content step 5
576
+ */
577
+ function wizard_5_save()
578
+ {
579
+ $data = filter_input_array(INPUT_POST, array(
580
+ 'chat_enabled' => FILTER_VALIDATE_BOOLEAN,
581
+ ));
582
+ tinv_update_option('chat', 'enabled', (bool)$data['chat_enabled']);
583
  }
584
 
585
  /**
587
  *
588
  * @return string
589
  */
590
+ function wizard_finish_title()
591
+ {
592
+ return __('Ready!', 'ti-woocommerce-wishlist');
593
  }
594
 
595
  /**
596
  * Content finish
597
  */
598
+ function wizard_finish()
599
+ {
600
+ TInvWL_View::view('finish', array(), 'wizard');
601
  }
602
  }
integrations/automatewoo.php CHANGED
@@ -54,6 +54,10 @@ function tinvwl_automatewoo_triggers($triggers)
54
  // AutomateWoo Wishlist class
55
  include_once 'automatewoo/wishlist.class.php';
56
 
 
 
 
 
57
  // Trigger wishlist item added.
58
  include_once 'automatewoo/trigger-wishlist-item-added.php';
59
  $triggers['tinvwl_wishlist_item_added'] = 'TINVWL_Trigger_Wishlist_Item_Added';
@@ -74,8 +78,58 @@ function tinvwl_automatewoo_triggers($triggers)
74
  include_once 'automatewoo/trigger-wishlist-item-removed.php';
75
  $triggers['tinvwl_wishlist_item_removed'] = 'TINVWL_Trigger_Wishlist_Item_Removed';
76
  } catch (Exception $e) {
77
-
78
  error_log(print_r($e->getMessage(), true));
79
  }
80
  return $triggers;
81
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  // AutomateWoo Wishlist class
55
  include_once 'automatewoo/wishlist.class.php';
56
 
57
+ add_filter('automatewoo/preview_data_layer', 'tinvwl_automatewoo_preview', 10, 2);
58
+ add_filter('automatewoo/variables', 'tinvwl_automatewoo_preview_variables');
59
+ add_filter('automatewoo_validate_data_item', 'tinvwl_automatewoo_validate_data_item', 10, 3);
60
+
61
  // Trigger wishlist item added.
62
  include_once 'automatewoo/trigger-wishlist-item-added.php';
63
  $triggers['tinvwl_wishlist_item_added'] = 'TINVWL_Trigger_Wishlist_Item_Added';
78
  include_once 'automatewoo/trigger-wishlist-item-removed.php';
79
  $triggers['tinvwl_wishlist_item_removed'] = 'TINVWL_Trigger_Wishlist_Item_Removed';
80
  } catch (Exception $e) {
 
81
  error_log(print_r($e->getMessage(), true));
82
  }
83
  return $triggers;
84
  }
85
+
86
+ function tinvwl_automatewoo_preview($data_layer, $data_items)
87
+ {
88
+ /**
89
+ * Wishlist
90
+ */
91
+ if (in_array('wishlist', $data_items)) {
92
+ $wishlist = new TINVWL_AutomateWoo_Wishlist();
93
+ $wl = new TInvWL_Wishlist();
94
+ $items = false;
95
+ $current_wl = $wl->get_by_user_default();
96
+ if ($current_wl && isset($current_wl[0]) && isset($current_wl[0]['ID'])) {
97
+ $wishlist->id = $current_wl[0]['ID'];
98
+ $wishlist->owner_id = $current_wl[0]['author'];
99
+ $wishlist->date = DateTime::createFromFormat("Y-m-d H:i:s", $current_wl[0]['date']);
100
+ $wishlist->get_items();
101
+ if ($wishlist->items) {
102
+ $items = true;
103
+ }
104
+ }
105
+
106
+ if (!$items) {
107
+ $product_query = new \WP_Query([
108
+ 'post_type' => 'product',
109
+ 'posts_per_page' => 4,
110
+ 'fields' => 'ids'
111
+ ]);
112
+ $wishlist->items = $product_query->posts;
113
+ }
114
+
115
+ $data_layer['wishlist'] = $wishlist;
116
+ }
117
+
118
+
119
+ return $data_layer;
120
+ }
121
+
122
+
123
+ function tinvwl_automatewoo_preview_variables($variables)
124
+ {
125
+ return $variables;
126
+ }
127
+
128
+ function tinvwl_automatewoo_validate_data_item($valid, $type, $item)
129
+ {
130
+ if ('wishlist' === $type) {
131
+ return true;
132
+ }
133
+
134
+ return $valid;
135
+ }
integrations/automatewoo/trigger-wishlist-item-added.php CHANGED
@@ -39,6 +39,7 @@ class TINVWL_Trigger_Wishlist_Item_Added extends AutomateWoo\Trigger
39
  $wishlist = new TINVWL_AutomateWoo_Wishlist();
40
  $wishlist->id = $data['wishlist_id'];
41
  $wishlist->owner_id = $data['author'];
 
42
 
43
  $this->maybe_run(array(
44
  'customer' => AutomateWoo\Customer_Factory::get_by_user_id($data['author']),
39
  $wishlist = new TINVWL_AutomateWoo_Wishlist();
40
  $wishlist->id = $data['wishlist_id'];
41
  $wishlist->owner_id = $data['author'];
42
+ $wishlist->get_items();
43
 
44
  $this->maybe_run(array(
45
  'customer' => AutomateWoo\Customer_Factory::get_by_user_id($data['author']),
integrations/automatewoo/trigger-wishlist-reminder.php CHANGED
@@ -13,7 +13,7 @@ if (!defined('ABSPATH')) {
13
  class TINVWL_Trigger_Wishlist_Reminder extends AutomateWoo\Triggers\AbstractBatchedDailyTrigger
14
  {
15
 
16
- public $supplied_data_items = ['customer', 'wishlist'];
17
 
18
  const SUPPORTS_QUEUING = false;
19
 
@@ -68,10 +68,7 @@ class TINVWL_Trigger_Wishlist_Reminder extends AutomateWoo\Triggers\AbstractBatc
68
 
69
  foreach ($wishlists as $wishlist) {
70
  $tasks[] = array(
71
- 'workflow_id' => $workflow->get_id(),
72
- 'workflow_data' => array(
73
- 'wishlist' => $wishlist,
74
- )
75
  );
76
  }
77
 
@@ -93,24 +90,25 @@ class TINVWL_Trigger_Wishlist_Reminder extends AutomateWoo\Triggers\AbstractBatc
93
  throw InvalidArgument::missing_required('wishlist');
94
  }
95
 
96
- $wishlist = isset($data['wishlist']) && !empty($data['wishlist']['author']) ? $data['wishlist'] : false;
97
 
98
  if (!$wishlist) {
99
  throw new RuntimeException('Wishlist not found.');
100
  }
101
 
102
- if (empty($data['wishlist']['author'])) {
103
  throw new RuntimeException('Wishlist customer not found.');
104
  }
105
 
106
  $normalized_wishlist = new TINVWL_AutomateWoo_Wishlist();
107
- $normalized_wishlist->id = $data['wishlist']['ID'];
108
- $normalized_wishlist->owner_id = $data['wishlist']['author'];
109
- $normalized_wishlist->date = DateTime::createFromFormat("Y-m-d H:i:s", $data['wishlist']['date']);
 
110
 
111
  $workflow->maybe_run(
112
  [
113
- 'customer' => AutomateWoo\Customer_Factory::get_by_user_id($data['wishlist']['author']),
114
  'wishlist' => $normalized_wishlist,
115
  ]
116
  );
@@ -180,5 +178,4 @@ class TINVWL_Trigger_Wishlist_Reminder extends AutomateWoo\Triggers\AbstractBatc
180
 
181
  return $date_created->getTimestamp() < $min_interval_date->getTimestamp();
182
  }
183
-
184
  }
13
  class TINVWL_Trigger_Wishlist_Reminder extends AutomateWoo\Triggers\AbstractBatchedDailyTrigger
14
  {
15
 
16
+ public $supplied_data_items = ['customer', 'wishlist', 'product'];
17
 
18
  const SUPPORTS_QUEUING = false;
19
 
68
 
69
  foreach ($wishlists as $wishlist) {
70
  $tasks[] = array(
71
+ 'wishlist' => $wishlist,
 
 
 
72
  );
73
  }
74
 
90
  throw InvalidArgument::missing_required('wishlist');
91
  }
92
 
93
+ $wishlist = isset($item['wishlist']) && !empty($item['wishlist']['author']) ? $item['wishlist'] : false;
94
 
95
  if (!$wishlist) {
96
  throw new RuntimeException('Wishlist not found.');
97
  }
98
 
99
+ if (empty($item['wishlist']['author'])) {
100
  throw new RuntimeException('Wishlist customer not found.');
101
  }
102
 
103
  $normalized_wishlist = new TINVWL_AutomateWoo_Wishlist();
104
+ $normalized_wishlist->id = $item['wishlist']['ID'];
105
+ $normalized_wishlist->owner_id = $item['wishlist']['author'];
106
+ $normalized_wishlist->date = DateTime::createFromFormat("Y-m-d H:i:s", $item['wishlist']['date']);
107
+ $normalized_wishlist->get_items();
108
 
109
  $workflow->maybe_run(
110
  [
111
+ 'customer' => AutomateWoo\Customer_Factory::get_by_user_id($item['wishlist']['author']),
112
  'wishlist' => $normalized_wishlist,
113
  ]
114
  );
178
 
179
  return $date_created->getTimestamp() < $min_interval_date->getTimestamp();
180
  }
 
181
  }
integrations/woocommerce-tm-extra-product-options.php CHANGED
@@ -326,11 +326,13 @@ function tinvwl_add_to_wishlist_tm_extra_product_options()
326
  wp_add_inline_script('tinvwl', "
327
  jQuery('body').on('tinvwl_add_to_wishlist_button_click', function(e, el){
328
  jQuery(el).closest('form.cart').each(function(){
329
- if (!jQuery(this)[0].checkValidity()){
330
- jQuery(el).addClass('disabled-add-wishlist');
331
- jQuery(this)[0].reportValidity();
332
- } else {
333
- jQuery(el).removeClass('disabled-add-wishlist');}
 
 
334
  });
335
  });
336
  ");
326
  wp_add_inline_script('tinvwl', "
327
  jQuery('body').on('tinvwl_add_to_wishlist_button_click', function(e, el){
328
  jQuery(el).closest('form.cart').each(function(){
329
+ if (jQuery(this).find('#tm-extra-product-options').length) {
330
+ if (!jQuery(this)[0].checkValidity()){
331
+ jQuery(el).addClass('disabled-add-wishlist');
332
+ jQuery(this)[0].reportValidity();
333
+ } else {
334
+ jQuery(el).removeClass('disabled-add-wishlist');}
335
+ }
336
  });
337
  });
338
  ");
languages/ti-woocommerce-wishlist.pot CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2021 TI WooCommerce Wishlist Plugin - 1.24.5
2
- # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 1.24.5 package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.24.5\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
@@ -60,7 +60,7 @@ msgstr ""
60
  msgid "Default Wishlist Name"
61
  msgstr ""
62
 
63
- #: admin/settings/general.class.php:126, admin/tinvwl.class.php:432
64
  msgid "Wishlist Page"
65
  msgstr ""
66
 
@@ -200,11 +200,11 @@ msgstr ""
200
  msgid "Add this shortcode <code>[ti_wishlists_addtowishlist]</code> anywhere on product page, if you have chosen custom position for product button. You will have to do this for each product."
201
  msgstr ""
202
 
203
- #: admin/settings/general.class.php:324, admin/settings/general.class.php:466, includes/wizard.class.php:415
204
  msgid "After \"Add to Cart\" button"
205
  msgstr ""
206
 
207
- #: admin/settings/general.class.php:325, admin/settings/general.class.php:467, includes/wizard.class.php:416
208
  msgid "Before \"Add to Cart\" button"
209
  msgstr ""
210
 
@@ -216,7 +216,7 @@ msgstr ""
216
  msgid "After summary"
217
  msgstr ""
218
 
219
- #: admin/settings/general.class.php:328, admin/settings/general.class.php:469, includes/wizard.class.php:417
220
  msgid "Custom position with code"
221
  msgstr ""
222
 
@@ -485,11 +485,15 @@ msgid "Do not show the \"0\" value in a counter if wishlist is empty."
485
  msgstr ""
486
 
487
  #: admin/settings/general.class.php:862
488
- msgid "Support chat settings"
489
  msgstr ""
490
 
491
- #: admin/settings/general.class.php:869
492
- msgid "Disable support chat"
 
 
 
 
493
  msgstr ""
494
 
495
  #: admin/settings/integrations.class.php:59
@@ -716,7 +720,7 @@ msgstr ""
716
  msgid "Normal Buttons Text Hover Color"
717
  msgstr ""
718
 
719
- #: admin/settings/upgrade.class.php:56, admin/tinvwl.class.php:300, views/wizard/finish.php:33
720
  msgid "Upgrade to Premium"
721
  msgstr ""
722
 
@@ -724,59 +728,67 @@ msgstr ""
724
  msgid "Premium Features"
725
  msgstr ""
726
 
727
- #: admin/tinvwl.class.php:102
728
  msgid "<strong>Welcome to WooCommerce Wishlist Plugin</strong> – You‘re almost ready to start :)"
729
  msgstr ""
730
 
731
- #: admin/tinvwl.class.php:104, admin/tinvwl.class.php:125
732
  msgid "Run the Setup Wizard"
733
  msgstr ""
734
 
735
- #: admin/tinvwl.class.php:106
736
  msgid "Skip Setup"
737
  msgstr ""
738
 
739
- #: admin/tinvwl.class.php:115, includes/notice.helper.php:115
740
  msgid "Dismiss"
741
  msgstr ""
742
 
743
- #: admin/tinvwl.class.php:116
744
  msgid "WooCommerce Wishlist Plugin is misconfigured!"
745
  msgstr ""
746
 
747
- #: admin/tinvwl.class.php:117
748
  msgid "Since the Setup Wizard was skipped, the Wishlist may function improperly."
749
  msgstr ""
750
 
751
- #: admin/tinvwl.class.php:118
752
  msgid "Create a New Page or open to edit a page where the Wishlist should be displayed."
753
  msgstr ""
754
 
755
- #: admin/tinvwl.class.php:119
756
  msgid "Add <code>[ti_wishlistsview]</code> shortcode into a page content."
757
  msgstr ""
758
 
759
- #: admin/tinvwl.class.php:120
760
  msgid "In a plugin General Settings section apply this page as a \"Wishlist\" page."
761
  msgstr ""
762
 
763
- #: admin/tinvwl.class.php:122
764
  msgid "Please apply the Wishlist page"
765
  msgstr ""
766
 
767
- #: admin/tinvwl.class.php:123
768
  msgid " or "
769
  msgstr ""
770
 
771
- #: admin/tinvwl.class.php:220
 
 
 
 
 
 
 
 
772
  msgid "Are you sure you want to reset the settings?"
773
  msgstr ""
774
 
775
- #: admin/tinvwl.class.php:340
776
  msgid "<code>%1$s</code> version <strong style=\"color:red\">%2$s</strong> is out of date. The core version is <strong style=\"color:red\">%3$s</strong>"
777
  msgstr ""
778
 
779
- #: admin/tinvwl.class.php:368
780
  msgid "<strong>Your theme (%1$s) contains outdated copies of some WooCommerce Wishlist Plugin template files.</strong><br> These files may need updating to ensure they are compatible with the current version of WooCommerce Wishlist Plugin.<br> You can see which files are affected from the <a href=\"%2$s\">system status page</a>.<br> If in doubt, check with the author of the theme."
781
  msgstr ""
782
 
@@ -928,47 +940,51 @@ msgstr ""
928
  msgid "read documentation"
929
  msgstr ""
930
 
931
- #: includes/wizard.class.php:271
932
  msgid "Introduction"
933
  msgstr ""
934
 
935
- #: includes/wizard.class.php:287, views/wizard/step-page.php:16
936
  msgid "Page Setup"
937
  msgstr ""
938
 
939
- #: includes/wizard.class.php:295, includes/wizard.class.php:326, integrations/theme-flatsome.php:124, public/tinvwl.class.php:683
940
  msgid "Wishlist"
941
  msgstr ""
942
 
943
- #: includes/wizard.class.php:299
944
  msgid "Create Automatically"
945
  msgstr ""
946
 
947
- #: includes/wizard.class.php:300
948
  msgid "Create new Page"
949
  msgstr ""
950
 
951
- #: includes/wizard.class.php:404
952
  msgid "Button"
953
  msgstr ""
954
 
955
- #: includes/wizard.class.php:448
956
  msgid "Processing"
957
  msgstr ""
958
 
959
- #: includes/wizard.class.php:458
960
  msgid "Automatically"
961
  msgstr ""
962
 
963
- #: includes/wizard.class.php:459
964
  msgid "Manual"
965
  msgstr ""
966
 
967
- #: includes/wizard.class.php:483, views/wizard/step-social.php:18
968
  msgid "Share"
969
  msgstr ""
970
 
971
- #: includes/wizard.class.php:527
 
 
 
 
972
  msgid "Ready!"
973
  msgstr ""
974
 
@@ -1489,11 +1505,11 @@ msgstr ""
1489
  msgid "\"Add to Wishlist\" Text in Product listing"
1490
  msgstr ""
1491
 
1492
- #: views/wizard/step-button.php:78, views/wizard/step-page.php:61, views/wizard/step-processing.php:39, views/wizard/step-social.php:85
1493
  msgid "Skip this step"
1494
  msgstr ""
1495
 
1496
- #: views/wizard/step-button.php:79, views/wizard/step-page.php:62, views/wizard/step-processing.php:40, views/wizard/step-social.php:86
1497
  msgid "continue"
1498
  msgstr ""
1499
 
1
+ # Copyright (C) 2021 TI WooCommerce Wishlist Plugin - 1.25.0
2
+ # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 1.25.0 package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.25.0\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
60
  msgid "Default Wishlist Name"
61
  msgstr ""
62
 
63
+ #: admin/settings/general.class.php:126, admin/tinvwl.class.php:448
64
  msgid "Wishlist Page"
65
  msgstr ""
66
 
200
  msgid "Add this shortcode <code>[ti_wishlists_addtowishlist]</code> anywhere on product page, if you have chosen custom position for product button. You will have to do this for each product."
201
  msgstr ""
202
 
203
+ #: admin/settings/general.class.php:324, admin/settings/general.class.php:466, includes/wizard.class.php:440
204
  msgid "After \"Add to Cart\" button"
205
  msgstr ""
206
 
207
+ #: admin/settings/general.class.php:325, admin/settings/general.class.php:467, includes/wizard.class.php:441
208
  msgid "Before \"Add to Cart\" button"
209
  msgstr ""
210
 
216
  msgid "After summary"
217
  msgstr ""
218
 
219
+ #: admin/settings/general.class.php:328, admin/settings/general.class.php:469, includes/wizard.class.php:442
220
  msgid "Custom position with code"
221
  msgstr ""
222
 
485
  msgstr ""
486
 
487
  #: admin/settings/general.class.php:862
488
+ msgid "Support Chat Settings"
489
  msgstr ""
490
 
491
+ #: admin/settings/general.class.php:863, views/wizard/step-support.php:22
492
+ msgid "Enable the support chat to get the most from our service and get answers to your questions promptly. We optimized the support process to get the required details from your current setup to solve your issues faster. Dedicated to your Care."
493
+ msgstr ""
494
+
495
+ #: admin/settings/general.class.php:869, views/wizard/step-support.php:26
496
+ msgid "Enable support chat"
497
  msgstr ""
498
 
499
  #: admin/settings/integrations.class.php:59
720
  msgid "Normal Buttons Text Hover Color"
721
  msgstr ""
722
 
723
+ #: admin/settings/upgrade.class.php:56, admin/tinvwl.class.php:316, views/wizard/finish.php:33
724
  msgid "Upgrade to Premium"
725
  msgstr ""
726
 
728
  msgid "Premium Features"
729
  msgstr ""
730
 
731
+ #: admin/tinvwl.class.php:105
732
  msgid "<strong>Welcome to WooCommerce Wishlist Plugin</strong> – You‘re almost ready to start :)"
733
  msgstr ""
734
 
735
+ #: admin/tinvwl.class.php:107, admin/tinvwl.class.php:128
736
  msgid "Run the Setup Wizard"
737
  msgstr ""
738
 
739
+ #: admin/tinvwl.class.php:109
740
  msgid "Skip Setup"
741
  msgstr ""
742
 
743
+ #: admin/tinvwl.class.php:118, includes/notice.helper.php:115
744
  msgid "Dismiss"
745
  msgstr ""
746
 
747
+ #: admin/tinvwl.class.php:119
748
  msgid "WooCommerce Wishlist Plugin is misconfigured!"
749
  msgstr ""
750
 
751
+ #: admin/tinvwl.class.php:120
752
  msgid "Since the Setup Wizard was skipped, the Wishlist may function improperly."
753
  msgstr ""
754
 
755
+ #: admin/tinvwl.class.php:121
756
  msgid "Create a New Page or open to edit a page where the Wishlist should be displayed."
757
  msgstr ""
758
 
759
+ #: admin/tinvwl.class.php:122
760
  msgid "Add <code>[ti_wishlistsview]</code> shortcode into a page content."
761
  msgstr ""
762
 
763
+ #: admin/tinvwl.class.php:123
764
  msgid "In a plugin General Settings section apply this page as a \"Wishlist\" page."
765
  msgstr ""
766
 
767
+ #: admin/tinvwl.class.php:125
768
  msgid "Please apply the Wishlist page"
769
  msgstr ""
770
 
771
+ #: admin/tinvwl.class.php:126
772
  msgid " or "
773
  msgstr ""
774
 
775
+ #: admin/tinvwl.class.php:138
776
+ msgid "The Support Chat is disabled by default for the plugin setting pages. Enable it to get the most from our service!"
777
+ msgstr ""
778
+
779
+ #: admin/tinvwl.class.php:140
780
+ msgid "Enable Support Chat"
781
+ msgstr ""
782
+
783
+ #: admin/tinvwl.class.php:236
784
  msgid "Are you sure you want to reset the settings?"
785
  msgstr ""
786
 
787
+ #: admin/tinvwl.class.php:356
788
  msgid "<code>%1$s</code> version <strong style=\"color:red\">%2$s</strong> is out of date. The core version is <strong style=\"color:red\">%3$s</strong>"
789
  msgstr ""
790
 
791
+ #: admin/tinvwl.class.php:384
792
  msgid "<strong>Your theme (%1$s) contains outdated copies of some WooCommerce Wishlist Plugin template files.</strong><br> These files may need updating to ensure they are compatible with the current version of WooCommerce Wishlist Plugin.<br> You can see which files are affected from the <a href=\"%2$s\">system status page</a>.<br> If in doubt, check with the author of the theme."
793
  msgstr ""
794
 
940
  msgid "read documentation"
941
  msgstr ""
942
 
943
+ #: includes/wizard.class.php:290
944
  msgid "Introduction"
945
  msgstr ""
946
 
947
+ #: includes/wizard.class.php:308, views/wizard/step-page.php:16
948
  msgid "Page Setup"
949
  msgstr ""
950
 
951
+ #: includes/wizard.class.php:317, includes/wizard.class.php:349, integrations/theme-flatsome.php:124, public/tinvwl.class.php:683
952
  msgid "Wishlist"
953
  msgstr ""
954
 
955
+ #: includes/wizard.class.php:321
956
  msgid "Create Automatically"
957
  msgstr ""
958
 
959
+ #: includes/wizard.class.php:322
960
  msgid "Create new Page"
961
  msgstr ""
962
 
963
+ #: includes/wizard.class.php:428
964
  msgid "Button"
965
  msgstr ""
966
 
967
+ #: includes/wizard.class.php:475
968
  msgid "Processing"
969
  msgstr ""
970
 
971
+ #: includes/wizard.class.php:486
972
  msgid "Automatically"
973
  msgstr ""
974
 
975
+ #: includes/wizard.class.php:487
976
  msgid "Manual"
977
  msgstr ""
978
 
979
+ #: includes/wizard.class.php:513, views/wizard/step-social.php:18
980
  msgid "Share"
981
  msgstr ""
982
 
983
+ #: includes/wizard.class.php:560, views/wizard/step-support.php:18
984
+ msgid "Support"
985
+ msgstr ""
986
+
987
+ #: includes/wizard.class.php:592
988
  msgid "Ready!"
989
  msgstr ""
990
 
1505
  msgid "\"Add to Wishlist\" Text in Product listing"
1506
  msgstr ""
1507
 
1508
+ #: views/wizard/step-button.php:78, views/wizard/step-page.php:61, views/wizard/step-processing.php:39, views/wizard/step-social.php:85, views/wizard/step-support.php:41
1509
  msgid "Skip this step"
1510
  msgstr ""
1511
 
1512
+ #: views/wizard/step-button.php:79, views/wizard/step-page.php:62, views/wizard/step-processing.php:40, views/wizard/step-social.php:86, views/wizard/step-support.php:42
1513
  msgid "continue"
1514
  msgstr ""
1515
 
readme.txt CHANGED
@@ -1,289 +1,219 @@
1
- === TI WooCommerce Wishlist ===
2
- Contributors: templateinvaders
3
- Tags: woocommerce, wishlist, woocommerce wishlist, e-commerce, ecommerce
4
- Requires at least: 4.7
5
- Tested up to: 5.7
6
- Stable tag: 1.24.5
7
- License: GPLv3
8
- License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
- Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
10
-
11
- Add WooCommerce Wishlist functionality to your store for free.
12
- Allow your store guests and customers to add products to Wishlist.
13
-
14
- == Description ==
15
-
16
- = Increase Sales and Conversions =
17
-
18
- WooCommerce Wishlist is a simple but powerful tool that can help you to convert your site visitors into loyal customers. There are many situations when customers can't buy a product at this time or simply don’t want. Possibility to save products for later encourages users to return to your site and after all, make a purchase. Adding products to Wishlist is easy and convenient so it may also force your customers to buy even more products than they planned. Users can share their wishlist, for example, to help their friends choose a gift for an upcoming holiday and so on. By sharing their Wishlists, they are bringing you, new potential customers. All in all this increasing amount of your site visitors, conversion and as a result sales.
19
-
20
- 🔗 [Live Preview #1](https://wishlist2.templateinvaders.com/?utm_source=wordpressorg&utm_content=preview)
21
- 🔗 [Live Preview #2](https://wishlist3.templateinvaders.com/?utm_source=wordpressorg&utm_content=preview)
22
- 🔗 [Live Preview #3](https://wishlist1.templateinvaders.com/?utm_source=wordpressorg&utm_content=preview)
23
-
24
- 🔗 [View documentation](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation)
25
-
26
- = Basic Features =
27
-
28
- + Select Wishlist page and Name
29
- + Remove the product from wishlist automatically, after adding it to cart
30
- + Position of "Add to wishlist" button on product page and catalogue
31
- + Shortcode for "Add to wishlist" button to place it anywhere on the page.
32
- + "Add to wishlist" Button or Link on product page
33
- + Predefined icons for "Add to Wishlist" button
34
- + Upload your custom "Add to Wishlist" button icon
35
- + Redirect to wishlist page after adding items to the wishlist
36
- + Customizable wishlist table columns
37
- + Share wishlist on social channels (Facebook, Twitter, Pinterest, Google+, WhatsApp, email)
38
- + Fully Customizable Appearance
39
- + Custom CSS styles
40
- + Translation ready
41
- + [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) Support
42
- + Cache friendly
43
-
44
- = Premium Features =
45
-
46
- TI WooCommerce Wishlist Premium version is a powerful marketing tool on top of a wishlist functionality!
47
-
48
- ➡ <strong>[GET PREMIUM VERSION NOW!](https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpress-plugin/?utm_source=wordpressorg&utm_content=get_premium)</strong>
49
-
50
- 🔹 Multi-wishlists per user
51
- 🔹 Wishlist privacy settings
52
- 🔹 Products quantity
53
- 🔹 Product analytics for admin
54
- 🔹 Promotional emails
55
- 🔹 Ask for an estimate feature
56
- 🔹 Following wishlist feature
57
- 🔹 Advanced settings almost for all basic features
58
- 🔹 Additional shortcodes and widgets
59
- 🔹 Premium predefined styles skin
60
-
61
- 🔗 [See the difference between free and premium versions](https://templateinvaders.com/free-vs-premium-woocommerce-wishlist-comparison/?utm_source=wordpressorg&utm_content=compare) of the most powerful Wishlist solution for WooCommerce.
62
-
63
- 💰 <strong>[100% Money Back Guarantee](https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpress-plugin/?utm_source=wordpressorg&utm_content=money_back)</strong>
64
-
65
- = COMPATIBILITY WITH MOST USED PLUGINS/ADDONS =
66
- We understand that our plugin is not the only one that you are going to use for your WooCommerce store and how it is important for different plugins to work well with each other. That is why we have added compatibility with the most used WooCommerce add-ons: [WooCommerce Bookings](https://woocommerce.com/products/woocommerce-bookings/?aff=3955), [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/?aff=3955), [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955), [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955), [WooCommerce Mix and Match](https://woocommerce.com/products/woocommerce-mix-and-match-products/?aff=3955), [WooCommerce Gravity Forms Product Add-Ons](https://woocommerce.com/products/gravity-forms-add-ons/?aff=3955), [WooCommerce Gift Cards](https://wordpress.org/plugins/gift-cards-for-woocommerce/), [WooCommerce TM Extra Product Options](https://codecanyon.net/item/woocommerce-extra-product-options/7908619), [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955).
67
- It is also very important for any WordPress website to use cache plugins, so we make sure that our WooCommerce Wishlist works well with [WP Rocket](https://wp-rocket.me/), [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/) and [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) plugins.
68
-
69
- = Add to Wishlist button =
70
- You can adjust Add to wishlist button settings to make it work best for your website.
71
- Make it a link or a button, choose from predefined icons or upload your own. Select predefined button position or place it wherever you want using the shortcode.
72
-
73
- = Customizable Wishlist table =
74
- You can show/hide any column in wishlist table on the wishlist page. So it is for you to decide what information to show and whatnot. Make your wishlist page informative or simple.
75
-
76
- = Make it fit your website perfectly =
77
- TI WooCommerce Wishlist comes with over 60 appearance options such as colours, font size, borders, etc. Not enough? You can add your custom CSS styles directly in the admin panel.
78
-
79
- = Translation Ready =
80
- You can easily translate TI WooCommerce Wishlist to any language. Simply choose the most convenient way for you: using poEdit tool, [Loco Translate](https://wordpress.org/plugins/loco-translate/), [WP Multilang](https://wordpress.org/plugins/wp-multilang/) or [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE).
81
-
82
- = Responsive & Retina Ready =
83
- We know how important responsive website for the online store in nowadays.
84
- That is why we made sure that Wishlist looks and works perfectly on any devices and the layouts are user-friendly. Simply check screenshots or preview.
85
-
86
- = GDPR Ready =
87
- The TI WooCommerce Wishlist does not collect any personal data from website visitors which makes it GDPR compliant.
88
-
89
- == Translations ==
90
- Want to add a new language to TI WooCommerce Wishlist? You can contribute via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/ti-woocommerce-wishlist).
91
-
92
-
93
- == Suggestions ==
94
- You are excited from the TI WooCommerce Wishlist and want to contribute? Get involved at our [GitHub repository](https://github.com/TemplateInvaders/ti-woocommerce-wishlist)
95
-
96
-
97
- == Documentation ==
98
- Full documentation is available [here](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation).
99
-
100
- == Installation ==
101
-
102
- There are few ways to install TI WooCommerce Wishlist:
103
-
104
- = 1. From the WordPress admin panel: =
105
-
106
- + Go to "Plugins" > "Add New" and search for "TI WooCommerce Wishlist"
107
-
108
- + Press "Install Now" button for the "TI WooCommerce Wishlist" plugin
109
-
110
- + After the installation is complete click "Activate" link (Plugins > Installed Plugins).
111
-
112
- = 2. Install manually using the FTP method. =
113
-
114
- + Download the plugin
115
-
116
- + Upload the plugin folder into /wp-content/plugins directory of your WordPress installation using your favourite FTP client.
117
-
118
- + Navigate to "Plugins" > "Installed Plugins" section in your dashboard and activate the plugin.
119
-
120
- = 3. Install manually from WordPress admin panel =
121
-
122
- + Download the plugin
123
-
124
- + Go to "Plugins" > "Add New" and press "Upload Plugin" button.
125
-
126
- + Browse the plugin archive and click "Install Now"
127
-
128
- + After the installation is complete click "Activate" link (Plugins > Installed Plugins).
129
-
130
- == Frequently Asked Questions ==
131
-
132
- = Where can I find documentation? =
133
-
134
- For help setting up and configuring, please refer to our [online documentation](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation_faq)
135
-
136
- [REST API documentation](https://templateinvaders.com/api/wishlist/?utm_source=wordpressorg&utm_content=documentation_faq)
137
-
138
- = Where can I get support or talk to other users? =
139
-
140
- If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.org/support/plugin/ti-woocommerce-wishlist) or [help page](https://templateinvaders.com/help/?utm_source=wordpressorg&utm_content=help_faq) on our website.
141
-
142
- = Where can I find the REST API documentation? =
143
-
144
- You can find the documentation of our [TI WooCommerce Wishlist REST API Docs](https://templateinvaders.com/api/wishlist/).
145
-
146
- = This plugin is awesome! Can I contribute? =
147
-
148
- Yes, you can! Join in on our [GitHub repository](https://github.com/TemplateInvaders/ti-woocommerce-wishlist)
149
-
150
- == Screenshots ==
151
-
152
- 1. TI WooCommerce Wishlist Settings page
153
- 2. TI WooCommerce Wishlist Appearance Options
154
- 3. The look of "Add to Wishlist" button on the frontend with different settings
155
- 4. Wishlist page with all columns, desktop view
156
- 5. Wishlist page with turned off date of addition, checkboxes and bulk actions.
157
- 6. When you click Add to Wishlist button a popup with success or error message appears.
158
- 7. Wishlist page, Tablet view
159
- 8. Wishlist page, Mobile view
160
- 9. Simplified Wishlist page, Mobile view
161
- 10. TI WooCommerce Wishlist comes with a setup wizard to help you configure the settings.
162
-
163
-
164
-
165
- == Changelog ==
166
- = 1.24.5 =
167
- *Release Date - 30 March 2021*
168
-
169
- * Fixed FOIT for the custom icon webfont
170
- * Security tweak
171
- * Forced uppercase removed from a wishlist unique share key
172
- * Updated integration with WooCommerce TM Extra Product Options plugin
173
- * Updated integration with [Product Options and Price Calculation Formulas for WooCommerce – Uni CPO](https://wordpress.org/plugins/uni-woo-custom-product-options/) plugin
174
-
175
- = 1.24.4 =
176
- *Release Date - 25 March 2021*
177
-
178
- * Security update
179
-
180
- = 1.24.3 =
181
- *Release Date - 22 March 2021*
182
-
183
- * Fixed conditional options of themes integration
184
- * Fixed WPML issue for variations name
185
-
186
- = 1.24.2 =
187
- *Release Date - 19 March 2021*
188
-
189
- * Fixed PHP warning for 3rd party integrations
190
-
191
- = 1.24.1 =
192
- *Release Date - 18 March 2021*
193
-
194
- * Updated integration for [Advanced Product Fields (Product Options) for WooCommerce](https://wordpress.org/plugins/advanced-product-fields-for-woocommerce/) plugin
195
- * Updated integration with "Advanced Product Fields for WooCommerce Pro" plugin
196
-
197
- = 1.24.0 =
198
- *Release Date - 18 March 2021*
199
-
200
- * Added plugin settings to allow disabling built-in integrations with 3rd party plugins and themes
201
- * Added preload for the plugin custom webfont
202
- * Added integration with [WooCommerce Square](https://woocommerce.com/products/square/?aff=3955) plugin
203
- * Updated integration with WooCommerce TM Extra Product Options plugin
204
-
205
- = 1.23.10 =
206
- *Release Date - 10 March 2021*
207
-
208
- * WordPress 5.7 support
209
- * WooCommerce 5.1 support
210
-
211
-
212
- = 1.23.9 =
213
- *Release Date - 3 March 2021*
214
-
215
- * Updated integration with [AutomateWoo](https://woocommerce.com/products/automatewoo/?aff=3955) plugin
216
-
217
- = 1.23.8 =
218
- *Release Date - 1 March 2021*
219
-
220
- * Updated integration with Improved Product Options for WooCommerce plugin
221
- * Minor CSS fixes
222
-
223
-
224
- = 1.23.7 =
225
- *Release Date - 23 February 2021*
226
-
227
- * Fixed PHP error in the Dashboard->Appearance->Menus page
228
- * Fixed the issue with WPML string translations for some admin text
229
-
230
- = 1.23.6 =
231
- *Release Date - 21 February 2021*
232
-
233
- * Added filter `tinvwl_load_webfont` to allow disable to load webfont from 3rd party code
234
- * Updated integration with [PW WooCommerce Gift Cards](https://wordpress.org/plugins/pw-woocommerce-gift-cards/) plugin
235
- * Updated integration with the Flatsome theme
236
- * Fixed issue when products don't add to wishlist while [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) configured to show the default language as a fallback
237
-
238
- = 1.23.5 =
239
- *Release Date - 19 February 2021*
240
-
241
- * Updated integration with Flatsome theme
242
- * Fixed issue related to passing extra data on add to wishlist event
243
- * Fixed Kinsta cache issue for the custom AJAX endpoint
244
-
245
- = 1.23.4 =
246
- *Release Date - 11 February 2021*
247
-
248
- * Added support of WooCommerce 5.0
249
- * Added integration with [PW WooCommerce Gift Cards](https://wordpress.org/plugins/pw-woocommerce-gift-cards/) plugin
250
- * Updated integration with [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955) plugin
251
- * Updated integration with [WooCommerce TM Extra Product Options](https://codecanyon.net/item/woocommerce-extra-product-options/7908619) plugin
252
- * Fixed PHP fatal error for WordPress less than 5.6.0 versions
253
- * Remove deleted products OR products with invalid product type from a wishlist
254
-
255
- = 1.23.3 =
256
- *Release Date - 5 February 2021*
257
-
258
- * Updated integration with "Advanced Product Fields for WooCommerce Pro" plugin
259
-
260
- = 1.23.2 =
261
- *Release Date - 4 February 2021*
262
-
263
- * Fixed translation issue for wishlist table buttons
264
- * Fixed PHP warning in rare cases of custom AJAX endpoint response
265
- * Minor CSS fixes
266
-
267
- = 1.23.1 =
268
- *Release Date - 2 February 2021*
269
-
270
- * Fixed PHP warning in customizer for Flatsome theme integration
271
- * Fixed potential PHP error for custom AJAX endpoint
272
-
273
- = 1.23.0 =
274
- *Release Date - 1 February 2021*
275
-
276
- * Added support of WooCommerce 4.9.x
277
- * Added add to wishlist button position state "After Thumbnails" for product page
278
- * Added add to wishlist button position state "After Summary" for product page
279
- * Updated add to wishlist button position state "Above Thumbnail" for catalog pages to display the button on top of the image
280
- * Updated integration with [PPOM for WooCommerce](https://wordpress.org/plugins/woocommerce-product-addon/) plugin
281
- * Updated integration with Flatsome theme
282
- * Updated integration with [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955) plugin
283
-
284
- [See the changelog for all versions](https://templateinvaders.com/changelogs/ti-woocommerce-wishlist-plugin-free-changelog/?utm_source=wordpressorg&utm_content=changelog).
285
-
286
- == Upgrade Notice ==
287
-
288
- = 1.24.5 =
289
- URGENT UPDATE! Fixed zero day cross site scripting vulnerability.
1
+ === TI WooCommerce Wishlist ===
2
+ Contributors: templateinvaders
3
+ Tags: woocommerce, wishlist, woocommerce wishlist, e-commerce, ecommerce
4
+ Requires at least: 4.7
5
+ Tested up to: 5.7
6
+ Stable tag: 1.25.0
7
+ License: GPLv3
8
+ License URI: https://www.gnu.org/licenses/gpl-3.0.html
9
+ Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
10
+
11
+ Add WooCommerce Wishlist functionality to your store for free.
12
+ Allow your store guests and customers to add products to Wishlist.
13
+
14
+ == Description ==
15
+
16
+ = Increase Sales and Conversions =
17
+
18
+ WooCommerce Wishlist is a simple but powerful tool that can help you to convert your site visitors into loyal customers. There are many situations when customers can't buy a product at this time or simply don’t want. Possibility to save products for later encourages users to return to your site and after all, make a purchase. Adding products to Wishlist is easy and convenient so it may also force your customers to buy even more products than they planned. Users can share their wishlist, for example, to help their friends choose a gift for an upcoming holiday and so on. By sharing their Wishlists, they are bringing you, new potential customers. All in all this increasing amount of your site visitors, conversion and as a result sales.
19
+
20
+ 🔗 [Live Preview #1](https://wishlist2.templateinvaders.com/?utm_source=wordpressorg&utm_content=preview)
21
+ 🔗 [Live Preview #2](https://wishlist3.templateinvaders.com/?utm_source=wordpressorg&utm_content=preview)
22
+ 🔗 [Live Preview #3](https://wishlist1.templateinvaders.com/?utm_source=wordpressorg&utm_content=preview)
23
+
24
+ 🔗 [View documentation](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation)
25
+
26
+ = Basic Features =
27
+
28
+ + Select Wishlist page and Name
29
+ + Remove the product from wishlist automatically, after adding it to cart
30
+ + Position of "Add to wishlist" button on product page and catalogue
31
+ + Shortcode for "Add to wishlist" button to place it anywhere on the page.
32
+ + "Add to wishlist" Button or Link on product page
33
+ + Predefined icons for "Add to Wishlist" button
34
+ + Upload your custom "Add to Wishlist" button icon
35
+ + Redirect to wishlist page after adding items to the wishlist
36
+ + Customizable wishlist table columns
37
+ + Share wishlist on social channels (Facebook, Twitter, Pinterest, Google+, WhatsApp, email)
38
+ + Fully Customizable Appearance
39
+ + Custom CSS styles
40
+ + Translation ready
41
+ + [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE) Support
42
+ + Cache friendly
43
+
44
+ = Premium Features =
45
+
46
+ TI WooCommerce Wishlist Premium version is a powerful marketing tool on top of a wishlist functionality!
47
+
48
+ ➡ <strong>[GET PREMIUM VERSION NOW!](https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpress-plugin/?utm_source=wordpressorg&utm_content=get_premium)</strong>
49
+
50
+ 🔹 Multi-wishlists per user
51
+ 🔹 Wishlist privacy settings
52
+ 🔹 Products quantity
53
+ 🔹 Product analytics for admin
54
+ 🔹 Promotional emails
55
+ 🔹 Ask for an estimate feature
56
+ 🔹 Following wishlist feature
57
+ 🔹 Advanced settings almost for all basic features
58
+ 🔹 Additional shortcodes and widgets
59
+ 🔹 Premium predefined styles skin
60
+
61
+ 🔗 [See the difference between free and premium versions](https://templateinvaders.com/free-vs-premium-woocommerce-wishlist-comparison/?utm_source=wordpressorg&utm_content=compare) of the most powerful Wishlist solution for WooCommerce.
62
+
63
+ 💰 <strong>[100% Money Back Guarantee](https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpress-plugin/?utm_source=wordpressorg&utm_content=money_back)</strong>
64
+
65
+ = COMPATIBILITY WITH MOST USED PLUGINS/ADDONS =
66
+ We understand that our plugin is not the only one that you are going to use for your WooCommerce store and how it is important for different plugins to work well with each other. That is why we have added compatibility with the most used WooCommerce add-ons: [WooCommerce Bookings](https://woocommerce.com/products/woocommerce-bookings/?aff=3955), [WooCommerce Subscriptions](https://woocommerce.com/products/woocommerce-subscriptions/?aff=3955), [WooCommerce Composite Products](https://woocommerce.com/products/composite-products/?aff=3955), [WooCommerce Product Bundles](https://woocommerce.com/products/product-bundles/?aff=3955), [WooCommerce Mix and Match](https://woocommerce.com/products/woocommerce-mix-and-match-products/?aff=3955), [WooCommerce Gravity Forms Product Add-Ons](https://woocommerce.com/products/gravity-forms-add-ons/?aff=3955), [WooCommerce Gift Cards](https://wordpress.org/plugins/gift-cards-for-woocommerce/), [WooCommerce TM Extra Product Options](https://codecanyon.net/item/woocommerce-extra-product-options/7908619), [WooCommerce Product Add-ons](https://woocommerce.com/products/product-add-ons/?aff=3955).
67
+ It is also very important for any WordPress website to use cache plugins, so we make sure that our WooCommerce Wishlist works well with [WP Rocket](https://wp-rocket.me/), [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/) and [W3 Total Cache](https://wordpress.org/plugins/w3-total-cache/) plugins.
68
+
69
+ = Add to Wishlist button =
70
+ You can adjust Add to wishlist button settings to make it work best for your website.
71
+ Make it a link or a button, choose from predefined icons or upload your own. Select predefined button position or place it wherever you want using the shortcode.
72
+
73
+ = Customizable Wishlist table =
74
+ You can show/hide any column in wishlist table on the wishlist page. So it is for you to decide what information to show and whatnot. Make your wishlist page informative or simple.
75
+
76
+ = Make it fit your website perfectly =
77
+ TI WooCommerce Wishlist comes with over 60 appearance options such as colours, font size, borders, etc. Not enough? You can add your custom CSS styles directly in the admin panel.
78
+
79
+ = Translation Ready =
80
+ You can easily translate TI WooCommerce Wishlist to any language. Simply choose the most convenient way for you: using poEdit tool, [Loco Translate](https://wordpress.org/plugins/loco-translate/), [WP Multilang](https://wordpress.org/plugins/wp-multilang/) or [WPML](https://wpml.org/?aid=9393&affiliate_key=9xzbMQnIyxHE).
81
+
82
+ = Responsive & Retina Ready =
83
+ We know how important responsive website for the online store in nowadays.
84
+ That is why we made sure that Wishlist looks and works perfectly on any devices and the layouts are user-friendly. Simply check screenshots or preview.
85
+
86
+ = GDPR Ready =
87
+ The TI WooCommerce Wishlist does not collect any personal data from website visitors which makes it GDPR compliant.
88
+
89
+ == Translations ==
90
+ Want to add a new language to TI WooCommerce Wishlist? You can contribute via [translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/ti-woocommerce-wishlist).
91
+
92
+
93
+ == Suggestions ==
94
+ You are excited from the TI WooCommerce Wishlist and want to contribute? Get involved at our [GitHub repository](https://github.com/TemplateInvaders/ti-woocommerce-wishlist)
95
+
96
+
97
+ == Documentation ==
98
+ Full documentation is available [here](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation).
99
+
100
+ == Installation ==
101
+
102
+ There are few ways to install TI WooCommerce Wishlist:
103
+
104
+ = 1. From the WordPress admin panel: =
105
+
106
+ + Go to "Plugins" > "Add New" and search for "TI WooCommerce Wishlist"
107
+
108
+ + Press "Install Now" button for the "TI WooCommerce Wishlist" plugin
109
+
110
+ + After the installation is complete click "Activate" link (Plugins > Installed Plugins).
111
+
112
+ = 2. Install manually using the FTP method. =
113
+
114
+ + Download the plugin
115
+
116
+ + Upload the plugin folder into /wp-content/plugins directory of your WordPress installation using your favourite FTP client.
117
+
118
+ + Navigate to "Plugins" > "Installed Plugins" section in your dashboard and activate the plugin.
119
+
120
+ = 3. Install manually from WordPress admin panel =
121
+
122
+ + Download the plugin
123
+
124
+ + Go to "Plugins" > "Add New" and press "Upload Plugin" button.
125
+
126
+ + Browse the plugin archive and click "Install Now"
127
+
128
+ + After the installation is complete click "Activate" link (Plugins > Installed Plugins).
129
+
130
+ == Frequently Asked Questions ==
131
+
132
+ = Where can I find documentation? =
133
+
134
+ For help setting up and configuring, please refer to our [online documentation](https://templateinvaders.com/documentation/ti-woocommerce-wishlist-free/?utm_source=wordpressorg&utm_content=documentation_faq)
135
+
136
+ [REST API documentation](https://templateinvaders.com/api/wishlist/?utm_source=wordpressorg&utm_content=documentation_faq)
137
+
138
+ = Where can I get support or talk to other users? =
139
+
140
+ If you get stuck, you can ask for help in the [Plugin Forum](https://wordpress.org/support/plugin/ti-woocommerce-wishlist) or [help page](https://templateinvaders.com/help/?utm_source=wordpressorg&utm_content=help_faq) on our website.
141
+
142
+ = Where can I find the REST API documentation? =
143
+
144
+ You can find the documentation of our [TI WooCommerce Wishlist REST API Docs](https://templateinvaders.com/api/wishlist/).
145
+
146
+ = This plugin is awesome! Can I contribute? =
147
+
148
+ Yes, you can! Join in on our [GitHub repository](https://github.com/TemplateInvaders/ti-woocommerce-wishlist)
149
+
150
+ == Screenshots ==
151
+
152
+ 1. TI WooCommerce Wishlist Settings page
153
+ 2. TI WooCommerce Wishlist Appearance Options
154
+ 3. The look of "Add to Wishlist" button on the frontend with different settings
155
+ 4. Wishlist page with all columns, desktop view
156
+ 5. Wishlist page with turned off date of addition, checkboxes and bulk actions.
157
+ 6. When you click Add to Wishlist button a popup with success or error message appears.
158
+ 7. Wishlist page, Tablet view
159
+ 8. Wishlist page, Mobile view
160
+ 9. Simplified Wishlist page, Mobile view
161
+ 10. TI WooCommerce Wishlist comes with a setup wizard to help you configure the settings.
162
+
163
+
164
+
165
+ == Changelog ==
166
+ = 1.25.0 =
167
+ *Release Date - 30 March 2021*
168
+
169
+ * WooCommerce 5.2 support
170
+ * Added opt-in options for the support chat
171
+ * Updated integration with [AutomateWoo](https://woocommerce.com/products/automatewoo/?aff=3955) plugin
172
+ * Updated integration with WooCommerce TM Extra Product Options plugin
173
+ * Fixed extra JavaScript alert on wishlist table bulk events
174
+
175
+ = 1.24.5 =
176
+ *Release Date - 30 March 2021*
177
+
178
+ * Fixed FOIT for the custom icon webfont
179
+ * Security tweak
180
+ * Forced uppercase removed from a wishlist unique share key
181
+ * Updated integration with WooCommerce TM Extra Product Options plugin
182
+ * Updated integration with [Product Options and Price Calculation Formulas for WooCommerce – Uni CPO](https://wordpress.org/plugins/uni-woo-custom-product-options/) plugin
183
+
184
+ = 1.24.4 =
185
+ *Release Date - 25 March 2021*
186
+
187
+ * Security update
188
+
189
+ = 1.24.3 =
190
+ *Release Date - 22 March 2021*
191
+
192
+ * Fixed conditional options of themes integration
193
+ * Fixed WPML issue for variations name
194
+
195
+ = 1.24.2 =
196
+ *Release Date - 19 March 2021*
197
+
198
+ * Fixed PHP warning for 3rd party integrations
199
+
200
+ = 1.24.1 =
201
+ *Release Date - 18 March 2021*
202
+
203
+ * Updated integration for [Advanced Product Fields (Product Options) for WooCommerce](https://wordpress.org/plugins/advanced-product-fields-for-woocommerce/) plugin
204
+ * Updated integration with "Advanced Product Fields for WooCommerce Pro" plugin
205
+
206
+ = 1.24.0 =
207
+ *Release Date - 18 March 2021*
208
+
209
+ * Added plugin settings to allow disabling built-in integrations with 3rd party plugins and themes
210
+ * Added preload for the plugin custom webfont
211
+ * Added integration with [WooCommerce Square](https://woocommerce.com/products/square/?aff=3955) plugin
212
+ * Updated integration with WooCommerce TM Extra Product Options plugin
213
+
214
+ [See the changelog for all versions](https://templateinvaders.com/changelogs/ti-woocommerce-wishlist-plugin-free-changelog/?utm_source=wordpressorg&utm_content=changelog).
215
+
216
+ == Upgrade Notice ==
217
+
218
+ = 1.25.0 =
219
+ Added opt-in options for the support chat in plugin settings.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ti-woocommerce-wishlist.php CHANGED
@@ -4,11 +4,11 @@
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.24.5
8
  * Requires at least: 4.7
9
  * Tested up to: 5.7
10
  * WC requires at least: 3.0
11
- * WC tested up to: 5.1
12
  * Author: TemplateInvaders
13
  * Author URI: https://templateinvaders.com/
14
  * License: GPL-2.0+
@@ -41,7 +41,7 @@ if (!defined('TINVWL_DOMAIN')) {
41
  }
42
 
43
  if (!defined('TINVWL_FVERSION')) {
44
- define('TINVWL_FVERSION', '1.24.5');
45
  }
46
 
47
  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.25.0
8
  * Requires at least: 4.7
9
  * Tested up to: 5.7
10
  * WC requires at least: 3.0
11
+ * WC tested up to: 5.2
12
  * Author: TemplateInvaders
13
  * Author URI: https://templateinvaders.com/
14
  * License: GPL-2.0+
41
  }
42
 
43
  if (!defined('TINVWL_FVERSION')) {
44
+ define('TINVWL_FVERSION', '1.25.0');
45
  }
46
 
47
  if (!defined('TINVWL_LOAD_FREE')) {
views/wizard/step-support.php ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * The Template for displaying wizard social step.
4
+ *
5
+ * @since 1.0.0
6
+ * @package TInvWishlist\Wizard\Template
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly.
11
+ }
12
+
13
+ ?>
14
+ <div class="tinwl-inner">
15
+ <div class="row">
16
+ <div>
17
+ <div class="tinvwl-title-wrap">
18
+ <h1><?php esc_html_e( 'Support', 'ti-woocommerce-wishlist' ); ?></h1>
19
+ <div class="tinvwl-separator"></div>
20
+ </div>
21
+
22
+ <div class="tinvwl-desc"><?php esc_html_e( 'Enable the support chat to get the most from our service and get answers to your questions promptly. We optimized the support process to get the required details from your current setup to solve your issues faster. Dedicated to your Care.', 'ti-woocommerce-wishlist' ); ?></div>
23
+
24
+ <div class="form-horizontal">
25
+ <div class="form-group">
26
+ <?php echo TInvWL_Form::_label( 'chat_enabled', __( 'Enable support chat', 'ti-woocommerce-wishlist' ), array( 'class' => 'col-md-6 control-label' ) ); // WPCS: xss ok. ?>
27
+ <div class="col-md-6">
28
+ <?php echo TInvWL_Form::_checkboxonoff( 'chat_enabled', $chat_enabled ); // WPCS: xss ok. ?>
29
+ </div>
30
+ </div>
31
+ </div>
32
+
33
+ </div>
34
+ </div>
35
+
36
+ <div class="tinvwl-separator"></div>
37
+
38
+ <div class="tinvwl-nav tinv-wishlist-clearfix">
39
+ <div class="tinvwl-next">
40
+ <a class="tinvwl-skip"
41
+ href="<?php echo esc_url( add_query_arg( 'step', absint( filter_input( INPUT_GET, 'step' ) ) + 1, set_url_scheme( ( is_ssl() ? 'https://' : 'http://' ) . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'] ) ) ); // @codingStandardsIgnoreLine WordPress.VIP.SuperGlobalInputUsage.AccessDetected ?>"><?php esc_html_e( 'Skip this step', 'ti-woocommerce-wishlist' ); ?></a>
42
+ <?php echo TInvWL_Form::_button_submit( 'nextstep', __( 'continue', 'ti-woocommerce-wishlist' ), array( 'class' => 'tinvwl-btn red w-icon round' ) ); // WPCS: xss ok. ?>
43
+ </div>
44
+ </div>
45
+ </div>