WooCommerce Wishlist Plugin - Version 1.44.0

Version Description

Release Date - 29 April 2022

  • Added support of WooCommerce Blocks
Download this release

Release Info

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

Code changes from version 1.43.0 to 1.44.0

admin/tinvwl.class.php CHANGED
@@ -7,15 +7,14 @@
7
  */
8
 
9
  // If this file is called directly, abort.
10
- if (!defined('ABSPATH')) {
11
  die;
12
  }
13
 
14
  /**
15
  * Admin pages class
16
  */
17
- class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
18
- {
19
 
20
  /**
21
  * Constructor
@@ -23,9 +22,8 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
23
  * @param string $plugin_name Plugin name.
24
  * @param string $version Plugin version.
25
  */
26
- function __construct($plugin_name, $version)
27
- {
28
- $this->_name = $plugin_name;
29
  $this->_version = $version;
30
  }
31
 
@@ -34,8 +32,7 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
34
  * Create Wishlist and Product class.
35
  * Load settings classes.
36
  */
37
- function load_function()
38
- {
39
  TInvWL_Includes_API_Yoasti18n::instance();
40
 
41
  $this->load_settings();
@@ -48,18 +45,17 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
48
  *
49
  * @return boolean
50
  */
51
- function load_settings()
52
- {
53
  $dir = TINVWL_PATH . 'admin/settings/';
54
- if (!file_exists($dir) || !is_dir($dir)) {
55
  return false;
56
  }
57
- $files = scandir($dir);
58
- foreach ($files as $value) {
59
- if (preg_match('/\.class\.php$/i', $value)) {
60
- $file = preg_replace('/\.class\.php$/i', '', $value);
61
- $class = 'TInvWL_Admin_Settings_' . ucfirst($file);
62
- $class::instance($this->_name, $this->_version);
63
  }
64
  }
65
 
@@ -69,229 +65,221 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
69
  /**
70
  * Define hooks
71
  */
72
- function define_hooks()
73
- {
74
- add_action('admin_menu', array($this, 'action_menu'));
75
- if ('skip' === filter_input(INPUT_GET, $this->_name . '-wizard')) {
76
- update_option($this->_name . '_wizard', true);
77
  }
78
- if (!get_option($this->_name . '_wizard')) {
79
- add_action('admin_notices', array($this, 'wizard_run_admin_notice'));
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('wp_ajax_tinvwl_admin_chat_notice', array($this, 'tinvwl_admin_chat_notice'));
87
- add_action('woocommerce_system_status_report', array($this, 'system_report_templates'));
88
 
89
- add_action('switch_theme', array($this, 'admin_notice_outdated_templates'));
90
- add_action('tinvwl_updated', array($this, 'admin_notice_outdated_templates'));
91
 
92
  // Add a post display state for special WC pages.
93
- add_filter('display_post_states', array($this, 'add_display_post_states'), 10, 2);
94
 
95
- add_action('tinvwl_admin_promo_footer', array($this, 'promo_footer'));
96
- add_action('tinvwl_remove_without_author_wishlist', array($this, 'remove_old_wishlists'));
97
  $this->scheduled_remove_wishlist();
 
 
98
  }
99
 
100
  /**
101
  * Error notice if wizard didn't run.
102
  */
103
- function wizard_run_admin_notice()
104
- {
105
- printf('<div class="notice notice-error"><p>%1$s</p><p><a href="%2$s" class="button-primary">%3$s</a> <a href="%4$s" class="button-secondary">%5$s</a></p></div>',
106
- __('<strong>Welcome to WooCommerce Wishlist Plugin</strong> – You‘re almost ready to start :)', 'ti-woocommerce-wishlist'), // @codingStandardsIgnoreLine WordPress.XSS.EscapeOutput.OutputNotEscaped
107
- esc_url(admin_url('index.php?page=tinvwl-wizard')),
108
- esc_html__('Run the Setup Wizard', 'ti-woocommerce-wishlist'),
109
- esc_url(admin_url('index.php?page=' . $this->_name . '&' . $this->_name . '-wizard=skip')),
110
- esc_html__('Skip Setup', 'ti-woocommerce-wishlist')
111
  );
112
  }
113
 
114
  /**
115
  * Error notice if wishlist page not set.
116
  */
117
- function empty_page_admin_notice()
118
- {
119
- printf('<div class="notice notice-error is-dismissible" style="position: relative;"><h4>%1$s</h4><p>%2$s</p><ol><li>%3$s</li><li>%4$s</li><li>%5$s</li></ol><p><a href="%6$s">%7$s</a>%8$s<a href="%9$s">%10$s</a></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __('Dismiss', 'ti-woocommerce-wishlist') . '</span></button></div>', // @codingStandardsIgnoreLine WordPress.XSS.EscapeOutput.OutputNotEscaped
120
- esc_html__('WooCommerce Wishlist Plugin is misconfigured!', 'ti-woocommerce-wishlist'),
121
- esc_html__('Since the Setup Wizard was skipped, the Wishlist may function improperly.', 'ti-woocommerce-wishlist'),
122
- esc_html__('Create a New Page or open to edit a page where the Wishlist should be displayed.', 'ti-woocommerce-wishlist'),
123
- __('Add <code>[ti_wishlistsview]</code> shortcode into a page content.', 'ti-woocommerce-wishlist'),
124
- esc_html__('In a plugin General Settings section apply this page as a "Wishlist" page.', 'ti-woocommerce-wishlist'),
125
- esc_url($this->admin_url('') . '#general'),
126
- esc_html__('Please apply the Wishlist page', 'ti-woocommerce-wishlist'),
127
- esc_html__(' or ', 'ti-woocommerce-wishlist'),
128
- esc_url(admin_url('index.php?page=tinvwl-wizard')),
129
- esc_html__('Run the Setup Wizard', 'ti-woocommerce-wishlist')
130
  );
131
  }
132
 
133
  /**
134
  * Notice to enable support chat.
135
  */
136
- function enable_chat_admin_notice()
137
- {
138
- if (!isset($_GET['page']) || substr($_GET['page'], 0, 6) !== 'tinvwl') {
139
  return;
140
  }
141
 
142
- $hide_notice = get_option('tinvwl_hide_chat_notice');
143
 
144
- if ($hide_notice) {
145
  return;
146
  }
147
 
148
- printf('<div class="notice notice-warning is-dismissible tinvwl-chat-notice"><p>%1$s</p><p><a href="%2$s" class="button-primary">%3$s</a></p></div>',
149
- __('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
150
- esc_url(admin_url('admin.php?page=tinvwl#chat')),
151
- esc_html__('Enable Support Chat', 'ti-woocommerce-wishlist')
152
  );
153
  }
154
 
155
- function tinvwl_admin_chat_notice()
156
- {
157
- update_option('tinvwl_hide_chat_notice', '1');
158
  }
159
 
160
  /**
161
  * Creation mune and sub-menu
162
  */
163
- function action_menu()
164
- {
165
  global $wp_roles;
166
- $page = add_menu_page(__('TI Wishlist', 'ti-woocommerce-wishlist'), __('TI Wishlist', 'ti-woocommerce-wishlist'), 'tinvwl_general_settings', $this->_name, null, TINVWL_URL . 'assets/img/icon_menu.png', '55.888');
167
- add_action("load-$page", array($this, 'onload'));
168
- add_action('admin_enqueue_scripts', array($this, 'add_inline_scripts'));
169
- $menu = apply_filters('tinvwl_admin_menu', array());
170
- foreach ($menu as $item) {
171
- if (!array_key_exists('page_title', $item)) {
172
  $item['page_title'] = $item['title'];
173
  }
174
- if (!array_key_exists('parent', $item)) {
175
  $item['parent'] = $this->_name;
176
  }
177
- if (!array_key_exists('capability', $item)) {
178
  $item['capability'] = 'manage_woocommerce';
179
  }
180
 
181
- if (!array_key_exists('roles', $item)) {
182
- $item['roles'] = array('administrator');
183
  }
184
 
185
- foreach ($item['roles'] as $role) {
186
- $wp_roles->add_cap($role, $item['capability']);
187
  }
188
 
189
- $item['slug'] = implode('-', array_filter(array($this->_name, $item['slug'])));
190
 
191
- $page = add_submenu_page($item['parent'], $item['page_title'], $item['title'], $item['capability'], $item['slug'], $item['method']);
192
- add_action("load-$page", array($this, 'onload'));
193
  }
194
  }
195
 
196
  /**
197
  * Load style and javascript
198
  */
199
- function onload()
200
- {
201
- add_action('admin_enqueue_scripts', array($this, 'enqueue_styles'));
202
- add_action('admin_enqueue_scripts', array($this, 'enqueue_scripts'));
203
- add_filter('admin_footer_text', array($this, 'footer_admin'));
204
- add_filter('screen_options_show_screen', array($this, 'screen_options_hide_screen'), 10, 2);
205
-
206
- add_filter('tinvwl_view_panelstatus', array($this, 'status_panel'), 9999);
207
  }
208
 
209
  /**
210
  * Load style
211
  */
212
- function enqueue_styles()
213
- {
214
- $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
215
-
216
- if (apply_filters('tinvwl_load_webfont_admin', true)) {
217
- wp_enqueue_style($this->_name . '-gfonts', (is_ssl() ? 'https' : 'http') . '://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800', '', null, 'all');
218
- wp_enqueue_style($this->_name . '-webfont', TINVWL_URL . 'assets/css/webfont' . $suffix . '.css', array(), $this->_version, 'all');
219
- wp_style_add_data($this->_name . '-webfont', 'rtl', 'replace');
220
- wp_style_add_data($this->_name . '-webfont', 'suffix', $suffix);
221
  }
222
 
223
- wp_enqueue_style($this->_name, TINVWL_URL . 'assets/css/admin' . $suffix . '.css', array(), $this->_version, 'all');
224
- wp_style_add_data($this->_name, 'rtl', 'replace');
225
- wp_style_add_data($this->_name, 'suffix', $suffix);
226
- wp_enqueue_style($this->_name . '-form', TINVWL_URL . 'assets/css/admin-form' . $suffix . '.css', array(), $this->_version, 'all');
227
- wp_style_add_data($this->_name . '-form', 'rtl', 'replace');
228
- wp_style_add_data($this->_name . '-form', 'suffix', $suffix);
229
  }
230
 
231
  /**
232
  * Load javascript
233
  */
234
- function add_inline_scripts()
235
- {
236
- wp_add_inline_script('jquery-blockui', 'jQuery(function(c){c("body").on("click.woo",\'a[href*="//woocommerce.com"]\',function(o){var e=(((o||{}).originalEvent||{}).target||{}).href||!1,r=((o||{}).currentTarget||{}).href||!1,t="&";e&&r&&(o.currentTarget.href=e.split("?")[0]+"?aff=3955",setTimeout(function(){o.originalEvent.target.href=e},1)),c("body").off("click.woo",\'a[href*="woocommerce.com"]\')})});');
237
  }
238
 
239
  /**
240
  * Load javascript
241
  */
242
- function enqueue_scripts()
243
- {
244
- $suffix = defined('SCRIPT_DEBUG') && SCRIPT_DEBUG ? '' : '.min';
245
- wp_enqueue_script($this->_name . '-bootstrap', TINVWL_URL . 'assets/js/bootstrap' . $suffix . '.js', array('jquery'), $this->_version, 'all');
246
- wp_register_script($this->_name, TINVWL_URL . 'assets/js/admin' . $suffix . '.js', array(
247
  'jquery',
248
  'wp-color-picker',
249
- ), $this->_version, 'all');
250
- wp_localize_script($this->_name, 'tinvwl_comfirm', array(
251
- 'text_comfirm_reset' => __('Are you sure you want to reset the settings?', 'ti-woocommerce-wishlist'),
252
- 'ajax_url' => WC()->ajax_url(),
253
- ));
254
- wp_enqueue_script($this->_name);
255
 
256
- if (tinv_get_option('chat', 'enabled')) {
257
 
258
- $geo = new WC_Geolocation(); // Get WC_Geolocation instance object
259
- $user_ip = $geo->get_ip_address(); // Get user IP
260
- $user_geo = $geo->geolocate_ip($user_ip); // Get geolocated user data.
261
- $country_code = $user_geo['country']; // Get the country code
262
- $restricted_codes = array('BD', 'PK', 'IN', 'NG', 'KE');
263
 
264
- if (!in_array($country_code, $restricted_codes)) {
265
 
266
- $user_id = get_current_user_id();
267
- $user_info = get_userdata($user_id);
268
  $current_theme = wp_get_theme();
269
 
270
  $parent_theme = $current_theme->parent();
271
 
272
- wp_add_inline_script($this->_name, 'window.intercomSettings = {
273
  app_id: "wj7rirzi",
274
  "Website": "' . get_site_url() . '",
275
  "Plugin name": "WooCommerce Wishlist Plugin",
276
  "Plugin version":"' . TINVWL_FVERSION . '",
277
- "Theme name":"' . $current_theme->get('Name') . '",
278
- "Theme version":"' . $current_theme->get('Version') . '",
279
- "Theme URI":"' . $current_theme->get('ThemeURI') . '",
280
- "Theme author":"' . $current_theme->get('Author') . '",
281
- "Theme author URI":"' . $current_theme->get('AuthorURI') . '",
282
- "Parent theme name":"' . (($parent_theme) ? $parent_theme->get('Name') : '') . '",
283
- "Parent theme version":"' . (($parent_theme) ? $parent_theme->get('Version') : '') . '",
284
- "Parent theme URI":"' . (($parent_theme) ? $parent_theme->get('ThemeURI') : '') . '",
285
- "Parent theme author":"' . (($parent_theme) ? $parent_theme->get('Author') : '') . '",
286
- "Parent theme author URI":"' . (($parent_theme) ? $parent_theme->get('AuthorURI') : '') . '",
287
  };
288
  (function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic("reattach_activator");ic("update",intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement("script");s.type="text/javascript";s.async=true;s.src="https://widget.intercom.io/widget/zyh6v0pc";var x=d.getElementsByTagName("script")[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent("onload",l);}else{w.addEventListener("load",l,false);}}})();
289
  Intercom("trackEvent", "wishlist-free-install", {
290
- theme_name:"' . (($parent_theme) ? $parent_theme->get('Name') : $current_theme->get('Name')) . '",
291
- theme_uri:"' . (($parent_theme) ? $parent_theme->get('ThemeURI') : $current_theme->get('ThemeURI')) . '",
292
- theme_author:"' . (($parent_theme) ? $parent_theme->get('Author') : $current_theme->get('Author')) . '",
293
- theme_author_uri:"' . (($parent_theme) ? $parent_theme->get('AuthorURI') : $current_theme->get('AuthorURI')) . '",
294
- theme_version:"' . (($parent_theme) ? $parent_theme->get('Version') : $current_theme->get('Version')) . '",
295
  website:"' . get_site_url() . '",
296
  user:"' . $user_info->user_email . '",
297
  user_name:"' . $user_info->user_nicename . '",
@@ -299,7 +287,7 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
299
  plugin_version:"' . TINVWL_FVERSION . '",
300
  partner:"' . TINVWL_UTM_SOURCE . '"
301
  });
302
- ');
303
  }
304
  }
305
  }
@@ -307,16 +295,14 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
307
  /**
308
  * Add plugin footer copywriting
309
  */
310
- function footer_admin()
311
- {
312
- do_action('tinvwl_admin_promo_footer');
313
  }
314
 
315
  /**
316
  * Promo in footer for wishlist
317
  */
318
- function promo_footer()
319
- {
320
  echo 'Made with <i class="ftinvwl ftinvwl-heart2"></i> by <a href="https://templateinvaders.com/?utm_source=' . TINVWL_UTM_SOURCE . '&utm_campaign=' . TINVWL_UTM_CAMPAIGN . '&utm_medium=' . TINVWL_UTM_MEDIUM . '&utm_content=made_by&partner=' . TINVWL_UTM_SOURCE . '">TemplateInvaders</a><br />If you like WooCommerce Wishlist Plugin please leave us a <a href="https://wordpress.org/support/plugin/ti-woocommerce-wishlist/reviews/#new-post"><span><i class="ftinvwl ftinvwl-star"></i><i class="ftinvwl ftinvwl-star"></i><i class="ftinvwl ftinvwl-star"></i><i class="ftinvwl ftinvwl-star"></i><i class="ftinvwl ftinvwl-star"></i></span></a> rating.'; // WPCS: xss ok.
321
  }
322
 
@@ -327,9 +313,8 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
327
  *
328
  * @return array
329
  */
330
- function status_panel($panel)
331
- {
332
- array_unshift($panel, sprintf('<a class="tinvwl-btn red w-icon smaller-txt" href="%s"><i class="ftinvwl ftinvwl-star"></i><span class="tinvwl-txt">%s</span></a>', 'https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpress-plugin/?utm_source=' . TINVWL_UTM_SOURCE . '&utm_campaign=' . TINVWL_UTM_CAMPAIGN . '&utm_medium=' . TINVWL_UTM_MEDIUM . '&utm_content=header_upgrade&partner=' . TINVWL_UTM_SOURCE, __('Upgrade to Premium', 'ti-woocommerce-wishlist')));
333
 
334
  return $panel;
335
  }
@@ -341,37 +326,36 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
341
  *
342
  * @return string
343
  */
344
- function templates_status_check($outdated = false)
345
- {
346
 
347
  $found_files = array();
348
 
349
- $scanned_files = WC_Admin_Status::scan_template_files(TINVWL_PATH . '/templates/');
350
 
351
- foreach ($scanned_files as $file) {
352
- if (file_exists(get_stylesheet_directory() . '/' . $file)) {
353
  $theme_file = get_stylesheet_directory() . '/' . $file;
354
- } elseif (file_exists(get_stylesheet_directory() . '/woocommerce/' . $file)) {
355
  $theme_file = get_stylesheet_directory() . '/woocommerce/' . $file;
356
- } elseif (file_exists(get_template_directory() . '/' . $file)) {
357
  $theme_file = get_template_directory() . '/' . $file;
358
- } elseif (file_exists(get_template_directory() . '/woocommerce/' . $file)) {
359
  $theme_file = get_template_directory() . '/woocommerce/' . $file;
360
  } else {
361
  $theme_file = false;
362
  }
363
 
364
- if (!empty($theme_file)) {
365
- $core_version = WC_Admin_Status::get_file_version(TINVWL_PATH . '/templates/' . $file);
366
- $theme_version = WC_Admin_Status::get_file_version($theme_file);
367
 
368
- if ($core_version && (empty($theme_version) || version_compare($theme_version, $core_version, '<'))) {
369
- if ($outdated) {
370
  return 'outdated';
371
  }
372
- $found_files[] = sprintf(__('<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>', 'ti-woocommerce-wishlist'), str_replace(WP_CONTENT_DIR . '/themes/', '', $theme_file), $theme_version ? $theme_version : '-', $core_version);
373
  } else {
374
- $found_files[] = str_replace(WP_CONTENT_DIR . '/themes/', '', $theme_file);
375
  }
376
  }
377
  }
@@ -382,26 +366,24 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
382
  /**
383
  * Templates overriding status for WooCommerce Status report page.
384
  */
385
- function system_report_templates()
386
- {
387
 
388
- TInvWL_View::view('templates-status', array('found_files' => $this->templates_status_check()));
389
  }
390
 
391
  /**
392
  * Outdated templates notice.
393
  */
394
- function admin_notice_outdated_templates()
395
- {
396
- if ('outdated' === $this->templates_status_check(true)) {
397
 
398
  $theme = wp_get_theme();
399
 
400
- $html = sprintf(__('<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.', 'ti-woocommerce-wishlist'), esc_html($theme['Name']), esc_url(admin_url('admin.php?page=wc-status')));
401
 
402
- WC_Admin_Notices::add_custom_notice('outdated_templates', $html);
403
  } else {
404
- WC_Admin_Notices::remove_notice('outdated_templates');
405
  }
406
  }
407
 
@@ -413,9 +395,8 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
413
  *
414
  * @return boolean
415
  */
416
- function screen_options_hide_screen($show_screen, $_this)
417
- {
418
- if ($this->_name === $_this->parent_base || $this->_name === $_this->parent_file) {
419
  return false;
420
  }
421
 
@@ -425,28 +406,26 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
425
  /**
426
  * Check if there is a hook in the cron
427
  */
428
- function scheduled_remove_wishlist()
429
- {
430
- $timestamp = wp_next_scheduled('tinvwl_remove_without_author_wishlist');
431
- if (!$timestamp) {
432
- $time = strtotime('00:00 today +1 HOURS');
433
- wp_schedule_event($time, 'daily', 'tinvwl_remove_without_author_wishlist');
434
  }
435
  }
436
 
437
  /**
438
  * Removing old wishlist without a user older than 34 days
439
  */
440
- public function remove_old_wishlists()
441
- {
442
- $wl = new TInvWL_Wishlist();
443
- $wishlists = $wl->get(array(
444
  'author' => 0,
445
- 'type' => 'default',
446
- 'sql' => 'SELECT * FROM {table} {where} AND `date` < DATE_SUB( CURDATE(), INTERVAL 34 DAY)',
447
- ));
448
- foreach ($wishlists as $wishlist) {
449
- $wl->remove($wishlist['ID']);
450
  }
451
  }
452
 
@@ -458,12 +437,25 @@ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base
458
  *
459
  * @return array
460
  */
461
- public function add_display_post_states($post_states, $post)
462
- {
463
- if (tinv_get_option('page', 'wishlist') === $post->ID) {
464
- $post_states['tinvwl_page_for_wishlist'] = __('Wishlist Page', 'ti-woocommerce-wishlist');
465
  }
466
 
467
  return $post_states;
468
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
469
  }
7
  */
8
 
9
  // If this file is called directly, abort.
10
+ if ( ! defined( 'ABSPATH' ) ) {
11
  die;
12
  }
13
 
14
  /**
15
  * Admin pages class
16
  */
17
+ class TInvWL_Admin_TInvWL extends TInvWL_Admin_Base {
 
18
 
19
  /**
20
  * Constructor
22
  * @param string $plugin_name Plugin name.
23
  * @param string $version Plugin version.
24
  */
25
+ function __construct( $plugin_name, $version ) {
26
+ $this->_name = $plugin_name;
 
27
  $this->_version = $version;
28
  }
29
 
32
  * Create Wishlist and Product class.
33
  * Load settings classes.
34
  */
35
+ function load_function() {
 
36
  TInvWL_Includes_API_Yoasti18n::instance();
37
 
38
  $this->load_settings();
45
  *
46
  * @return boolean
47
  */
48
+ function load_settings() {
 
49
  $dir = TINVWL_PATH . 'admin/settings/';
50
+ if ( ! file_exists( $dir ) || ! is_dir( $dir ) ) {
51
  return false;
52
  }
53
+ $files = scandir( $dir );
54
+ foreach ( $files as $value ) {
55
+ if ( preg_match( '/\.class\.php$/i', $value ) ) {
56
+ $file = preg_replace( '/\.class\.php$/i', '', $value );
57
+ $class = 'TInvWL_Admin_Settings_' . ucfirst( $file );
58
+ $class::instance( $this->_name, $this->_version );
59
  }
60
  }
61
 
65
  /**
66
  * Define hooks
67
  */
68
+ function define_hooks() {
69
+ add_action( 'admin_menu', array( $this, 'action_menu' ) );
70
+ if ( 'skip' === filter_input( INPUT_GET, $this->_name . '-wizard' ) ) {
71
+ update_option( $this->_name . '_wizard', true );
 
72
  }
73
+ if ( ! get_option( $this->_name . '_wizard' ) ) {
74
+ add_action( 'admin_notices', array( $this, 'wizard_run_admin_notice' ) );
75
+ } elseif ( ! tinv_get_option( 'page', 'wishlist' ) ) {
76
+ add_action( 'admin_notices', array( $this, 'empty_page_admin_notice' ) );
77
  }
78
+ if ( ! tinv_get_option( 'chat', 'enabled' ) ) {
79
+ add_action( 'admin_notices', array( $this, 'enable_chat_admin_notice' ) );
80
  }
81
+ add_action( 'wp_ajax_tinvwl_admin_chat_notice', array( $this, 'tinvwl_admin_chat_notice' ) );
82
+ add_action( 'woocommerce_system_status_report', array( $this, 'system_report_templates' ) );
83
 
84
+ add_action( 'switch_theme', array( $this, 'admin_notice_outdated_templates' ) );
85
+ add_action( 'tinvwl_updated', array( $this, 'admin_notice_outdated_templates' ) );
86
 
87
  // Add a post display state for special WC pages.
88
+ add_filter( 'display_post_states', array( $this, 'add_display_post_states' ), 10, 2 );
89
 
90
+ add_action( 'tinvwl_admin_promo_footer', array( $this, 'promo_footer' ) );
91
+ add_action( 'tinvwl_remove_without_author_wishlist', array( $this, 'remove_old_wishlists' ) );
92
  $this->scheduled_remove_wishlist();
93
+
94
+ add_action( 'enqueue_block_editor_assets', array( $this, 'woocommerce_blocks_editor' ), 10, 2 );
95
  }
96
 
97
  /**
98
  * Error notice if wizard didn't run.
99
  */
100
+ function wizard_run_admin_notice() {
101
+ printf( '<div class="notice notice-error"><p>%1$s</p><p><a href="%2$s" class="button-primary">%3$s</a> <a href="%4$s" class="button-secondary">%5$s</a></p></div>',
102
+ __( '<strong>Welcome to WooCommerce Wishlist Plugin</strong> You‘re almost ready to start :)', 'ti-woocommerce-wishlist' ), // @codingStandardsIgnoreLine WordPress.XSS.EscapeOutput.OutputNotEscaped
103
+ esc_url( admin_url( 'index.php?page=tinvwl-wizard' ) ),
104
+ esc_html__( 'Run the Setup Wizard', 'ti-woocommerce-wishlist' ),
105
+ esc_url( admin_url( 'index.php?page=' . $this->_name . '&' . $this->_name . '-wizard=skip' ) ),
106
+ esc_html__( 'Skip Setup', 'ti-woocommerce-wishlist' )
 
107
  );
108
  }
109
 
110
  /**
111
  * Error notice if wishlist page not set.
112
  */
113
+ function empty_page_admin_notice() {
114
+ printf( '<div class="notice notice-error is-dismissible" style="position: relative;"><h4>%1$s</h4><p>%2$s</p><ol><li>%3$s</li><li>%4$s</li><li>%5$s</li></ol><p><a href="%6$s">%7$s</a>%8$s<a href="%9$s">%10$s</a></p><button type="button" class="notice-dismiss"><span class="screen-reader-text">' . __( 'Dismiss', 'ti-woocommerce-wishlist' ) . '</span></button></div>', // @codingStandardsIgnoreLine WordPress.XSS.EscapeOutput.OutputNotEscaped
115
+ esc_html__( 'WooCommerce Wishlist Plugin is misconfigured!', 'ti-woocommerce-wishlist' ),
116
+ esc_html__( 'Since the Setup Wizard was skipped, the Wishlist may function improperly.', 'ti-woocommerce-wishlist' ),
117
+ esc_html__( 'Create a New Page or open to edit a page where the Wishlist should be displayed.', 'ti-woocommerce-wishlist' ),
118
+ __( 'Add <code>[ti_wishlistsview]</code> shortcode into a page content.', 'ti-woocommerce-wishlist' ),
119
+ esc_html__( 'In a plugin General Settings section apply this page as a "Wishlist" page.', 'ti-woocommerce-wishlist' ),
120
+ esc_url( $this->admin_url( '' ) . '#general' ),
121
+ esc_html__( 'Please apply the Wishlist page', 'ti-woocommerce-wishlist' ),
122
+ esc_html__( ' or ', 'ti-woocommerce-wishlist' ),
123
+ esc_url( admin_url( 'index.php?page=tinvwl-wizard' ) ),
124
+ esc_html__( 'Run the Setup Wizard', 'ti-woocommerce-wishlist' )
 
125
  );
126
  }
127
 
128
  /**
129
  * Notice to enable support chat.
130
  */
131
+ function enable_chat_admin_notice() {
132
+ if ( ! isset( $_GET['page'] ) || substr( $_GET['page'], 0, 6 ) !== 'tinvwl' ) {
 
133
  return;
134
  }
135
 
136
+ $hide_notice = get_option( 'tinvwl_hide_chat_notice' );
137
 
138
+ if ( $hide_notice ) {
139
  return;
140
  }
141
 
142
+ printf( '<div class="notice notice-warning is-dismissible tinvwl-chat-notice"><p>%1$s</p><p><a href="%2$s" class="button-primary">%3$s</a></p></div>',
143
+ __( '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
144
+ esc_url( admin_url( 'admin.php?page=tinvwl#chat' ) ),
145
+ esc_html__( 'Enable Support Chat', 'ti-woocommerce-wishlist' )
146
  );
147
  }
148
 
149
+ function tinvwl_admin_chat_notice() {
150
+ update_option( 'tinvwl_hide_chat_notice', '1' );
 
151
  }
152
 
153
  /**
154
  * Creation mune and sub-menu
155
  */
156
+ function action_menu() {
 
157
  global $wp_roles;
158
+ $page = add_menu_page( __( 'TI Wishlist', 'ti-woocommerce-wishlist' ), __( 'TI Wishlist', 'ti-woocommerce-wishlist' ), 'tinvwl_general_settings', $this->_name, null, TINVWL_URL . 'assets/img/icon_menu.png', '55.888' );
159
+ add_action( "load-$page", array( $this, 'onload' ) );
160
+ add_action( 'admin_enqueue_scripts', array( $this, 'add_inline_scripts' ) );
161
+ $menu = apply_filters( 'tinvwl_admin_menu', array() );
162
+ foreach ( $menu as $item ) {
163
+ if ( ! array_key_exists( 'page_title', $item ) ) {
164
  $item['page_title'] = $item['title'];
165
  }
166
+ if ( ! array_key_exists( 'parent', $item ) ) {
167
  $item['parent'] = $this->_name;
168
  }
169
+ if ( ! array_key_exists( 'capability', $item ) ) {
170
  $item['capability'] = 'manage_woocommerce';
171
  }
172
 
173
+ if ( ! array_key_exists( 'roles', $item ) ) {
174
+ $item['roles'] = array( 'administrator' );
175
  }
176
 
177
+ foreach ( $item['roles'] as $role ) {
178
+ $wp_roles->add_cap( $role, $item['capability'] );
179
  }
180
 
181
+ $item['slug'] = implode( '-', array_filter( array( $this->_name, $item['slug'] ) ) );
182
 
183
+ $page = add_submenu_page( $item['parent'], $item['page_title'], $item['title'], $item['capability'], $item['slug'], $item['method'] );
184
+ add_action( "load-$page", array( $this, 'onload' ) );
185
  }
186
  }
187
 
188
  /**
189
  * Load style and javascript
190
  */
191
+ function onload() {
192
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_styles' ) );
193
+ add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_scripts' ) );
194
+ add_filter( 'admin_footer_text', array( $this, 'footer_admin' ) );
195
+ add_filter( 'screen_options_show_screen', array( $this, 'screen_options_hide_screen' ), 10, 2 );
196
+
197
+ add_filter( 'tinvwl_view_panelstatus', array( $this, 'status_panel' ), 9999 );
 
198
  }
199
 
200
  /**
201
  * Load style
202
  */
203
+ function enqueue_styles() {
204
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
205
+
206
+ if ( apply_filters( 'tinvwl_load_webfont_admin', true ) ) {
207
+ wp_enqueue_style( $this->_name . '-gfonts', ( is_ssl() ? 'https' : 'http' ) . '://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800', '', null, 'all' );
208
+ wp_enqueue_style( $this->_name . '-webfont', TINVWL_URL . 'assets/css/webfont' . $suffix . '.css', array(), $this->_version, 'all' );
209
+ wp_style_add_data( $this->_name . '-webfont', 'rtl', 'replace' );
210
+ wp_style_add_data( $this->_name . '-webfont', 'suffix', $suffix );
 
211
  }
212
 
213
+ wp_enqueue_style( $this->_name, TINVWL_URL . 'assets/css/admin' . $suffix . '.css', array(), $this->_version, 'all' );
214
+ wp_style_add_data( $this->_name, 'rtl', 'replace' );
215
+ wp_style_add_data( $this->_name, 'suffix', $suffix );
216
+ wp_enqueue_style( $this->_name . '-form', TINVWL_URL . 'assets/css/admin-form' . $suffix . '.css', array(), $this->_version, 'all' );
217
+ wp_style_add_data( $this->_name . '-form', 'rtl', 'replace' );
218
+ wp_style_add_data( $this->_name . '-form', 'suffix', $suffix );
219
  }
220
 
221
  /**
222
  * Load javascript
223
  */
224
+ function add_inline_scripts() {
225
+ wp_add_inline_script( 'jquery-blockui', 'jQuery(function(c){c("body").on("click.woo",\'a[href*="//woocommerce.com"]\',function(o){var e=(((o||{}).originalEvent||{}).target||{}).href||!1,r=((o||{}).currentTarget||{}).href||!1,t="&";e&&r&&(o.currentTarget.href=e.split("?")[0]+"?aff=3955",setTimeout(function(){o.originalEvent.target.href=e},1)),c("body").off("click.woo",\'a[href*="woocommerce.com"]\')})});' );
 
226
  }
227
 
228
  /**
229
  * Load javascript
230
  */
231
+ function enqueue_scripts() {
232
+ $suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
233
+ wp_enqueue_script( $this->_name . '-bootstrap', TINVWL_URL . 'assets/js/bootstrap' . $suffix . '.js', array( 'jquery' ), $this->_version, 'all' );
234
+ wp_register_script( $this->_name, TINVWL_URL . 'assets/js/admin' . $suffix . '.js', array(
 
235
  'jquery',
236
  'wp-color-picker',
237
+ ), $this->_version, 'all' );
238
+ wp_localize_script( $this->_name, 'tinvwl_comfirm', array(
239
+ 'text_comfirm_reset' => __( 'Are you sure you want to reset the settings?', 'ti-woocommerce-wishlist' ),
240
+ 'ajax_url' => WC()->ajax_url(),
241
+ ) );
242
+ wp_enqueue_script( $this->_name );
243
 
244
+ if ( tinv_get_option( 'chat', 'enabled' ) ) {
245
 
246
+ $geo = new WC_Geolocation(); // Get WC_Geolocation instance object
247
+ $user_ip = $geo->get_ip_address(); // Get user IP
248
+ $user_geo = $geo->geolocate_ip( $user_ip ); // Get geolocated user data.
249
+ $country_code = $user_geo['country']; // Get the country code
250
+ $restricted_codes = array( 'BD', 'PK', 'IN', 'NG', 'KE' );
251
 
252
+ if ( ! in_array( $country_code, $restricted_codes ) ) {
253
 
254
+ $user_id = get_current_user_id();
255
+ $user_info = get_userdata( $user_id );
256
  $current_theme = wp_get_theme();
257
 
258
  $parent_theme = $current_theme->parent();
259
 
260
+ wp_add_inline_script( $this->_name, 'window.intercomSettings = {
261
  app_id: "wj7rirzi",
262
  "Website": "' . get_site_url() . '",
263
  "Plugin name": "WooCommerce Wishlist Plugin",
264
  "Plugin version":"' . TINVWL_FVERSION . '",
265
+ "Theme name":"' . $current_theme->get( 'Name' ) . '",
266
+ "Theme version":"' . $current_theme->get( 'Version' ) . '",
267
+ "Theme URI":"' . $current_theme->get( 'ThemeURI' ) . '",
268
+ "Theme author":"' . $current_theme->get( 'Author' ) . '",
269
+ "Theme author URI":"' . $current_theme->get( 'AuthorURI' ) . '",
270
+ "Parent theme name":"' . ( ( $parent_theme ) ? $parent_theme->get( 'Name' ) : '' ) . '",
271
+ "Parent theme version":"' . ( ( $parent_theme ) ? $parent_theme->get( 'Version' ) : '' ) . '",
272
+ "Parent theme URI":"' . ( ( $parent_theme ) ? $parent_theme->get( 'ThemeURI' ) : '' ) . '",
273
+ "Parent theme author":"' . ( ( $parent_theme ) ? $parent_theme->get( 'Author' ) : '' ) . '",
274
+ "Parent theme author URI":"' . ( ( $parent_theme ) ? $parent_theme->get( 'AuthorURI' ) : '' ) . '",
275
  };
276
  (function(){var w=window;var ic=w.Intercom;if(typeof ic==="function"){ic("reattach_activator");ic("update",intercomSettings);}else{var d=document;var i=function(){i.c(arguments)};i.q=[];i.c=function(args){i.q.push(args)};w.Intercom=i;function l(){var s=d.createElement("script");s.type="text/javascript";s.async=true;s.src="https://widget.intercom.io/widget/zyh6v0pc";var x=d.getElementsByTagName("script")[0];x.parentNode.insertBefore(s,x);}if(w.attachEvent){w.attachEvent("onload",l);}else{w.addEventListener("load",l,false);}}})();
277
  Intercom("trackEvent", "wishlist-free-install", {
278
+ theme_name:"' . ( ( $parent_theme ) ? $parent_theme->get( 'Name' ) : $current_theme->get( 'Name' ) ) . '",
279
+ theme_uri:"' . ( ( $parent_theme ) ? $parent_theme->get( 'ThemeURI' ) : $current_theme->get( 'ThemeURI' ) ) . '",
280
+ theme_author:"' . ( ( $parent_theme ) ? $parent_theme->get( 'Author' ) : $current_theme->get( 'Author' ) ) . '",
281
+ theme_author_uri:"' . ( ( $parent_theme ) ? $parent_theme->get( 'AuthorURI' ) : $current_theme->get( 'AuthorURI' ) ) . '",
282
+ theme_version:"' . ( ( $parent_theme ) ? $parent_theme->get( 'Version' ) : $current_theme->get( 'Version' ) ) . '",
283
  website:"' . get_site_url() . '",
284
  user:"' . $user_info->user_email . '",
285
  user_name:"' . $user_info->user_nicename . '",
287
  plugin_version:"' . TINVWL_FVERSION . '",
288
  partner:"' . TINVWL_UTM_SOURCE . '"
289
  });
290
+ ' );
291
  }
292
  }
293
  }
295
  /**
296
  * Add plugin footer copywriting
297
  */
298
+ function footer_admin() {
299
+ do_action( 'tinvwl_admin_promo_footer' );
 
300
  }
301
 
302
  /**
303
  * Promo in footer for wishlist
304
  */
305
+ function promo_footer() {
 
306
  echo 'Made with <i class="ftinvwl ftinvwl-heart2"></i> by <a href="https://templateinvaders.com/?utm_source=' . TINVWL_UTM_SOURCE . '&utm_campaign=' . TINVWL_UTM_CAMPAIGN . '&utm_medium=' . TINVWL_UTM_MEDIUM . '&utm_content=made_by&partner=' . TINVWL_UTM_SOURCE . '">TemplateInvaders</a><br />If you like WooCommerce Wishlist Plugin please leave us a <a href="https://wordpress.org/support/plugin/ti-woocommerce-wishlist/reviews/#new-post"><span><i class="ftinvwl ftinvwl-star"></i><i class="ftinvwl ftinvwl-star"></i><i class="ftinvwl ftinvwl-star"></i><i class="ftinvwl ftinvwl-star"></i><i class="ftinvwl ftinvwl-star"></i></span></a> rating.'; // WPCS: xss ok.
307
  }
308
 
313
  *
314
  * @return array
315
  */
316
+ function status_panel( $panel ) {
317
+ array_unshift( $panel, sprintf( '<a class="tinvwl-btn red w-icon smaller-txt" href="%s"><i class="ftinvwl ftinvwl-star"></i><span class="tinvwl-txt">%s</span></a>', 'https://templateinvaders.com/product/ti-woocommerce-wishlist-wordpress-plugin/?utm_source=' . TINVWL_UTM_SOURCE . '&utm_campaign=' . TINVWL_UTM_CAMPAIGN . '&utm_medium=' . TINVWL_UTM_MEDIUM . '&utm_content=header_upgrade&partner=' . TINVWL_UTM_SOURCE, __( 'Upgrade to Premium', 'ti-woocommerce-wishlist' ) ) );
 
318
 
319
  return $panel;
320
  }
326
  *
327
  * @return string
328
  */
329
+ function templates_status_check( $outdated = false ) {
 
330
 
331
  $found_files = array();
332
 
333
+ $scanned_files = WC_Admin_Status::scan_template_files( TINVWL_PATH . '/templates/' );
334
 
335
+ foreach ( $scanned_files as $file ) {
336
+ if ( file_exists( get_stylesheet_directory() . '/' . $file ) ) {
337
  $theme_file = get_stylesheet_directory() . '/' . $file;
338
+ } elseif ( file_exists( get_stylesheet_directory() . '/woocommerce/' . $file ) ) {
339
  $theme_file = get_stylesheet_directory() . '/woocommerce/' . $file;
340
+ } elseif ( file_exists( get_template_directory() . '/' . $file ) ) {
341
  $theme_file = get_template_directory() . '/' . $file;
342
+ } elseif ( file_exists( get_template_directory() . '/woocommerce/' . $file ) ) {
343
  $theme_file = get_template_directory() . '/woocommerce/' . $file;
344
  } else {
345
  $theme_file = false;
346
  }
347
 
348
+ if ( ! empty( $theme_file ) ) {
349
+ $core_version = WC_Admin_Status::get_file_version( TINVWL_PATH . '/templates/' . $file );
350
+ $theme_version = WC_Admin_Status::get_file_version( $theme_file );
351
 
352
+ if ( $core_version && ( empty( $theme_version ) || version_compare( $theme_version, $core_version, '<' ) ) ) {
353
+ if ( $outdated ) {
354
  return 'outdated';
355
  }
356
+ $found_files[] = sprintf( __( '<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>', 'ti-woocommerce-wishlist' ), str_replace( WP_CONTENT_DIR . '/themes/', '', $theme_file ), $theme_version ? $theme_version : '-', $core_version );
357
  } else {
358
+ $found_files[] = str_replace( WP_CONTENT_DIR . '/themes/', '', $theme_file );
359
  }
360
  }
361
  }
366
  /**
367
  * Templates overriding status for WooCommerce Status report page.
368
  */
369
+ function system_report_templates() {
 
370
 
371
+ TInvWL_View::view( 'templates-status', array( 'found_files' => $this->templates_status_check() ) );
372
  }
373
 
374
  /**
375
  * Outdated templates notice.
376
  */
377
+ function admin_notice_outdated_templates() {
378
+ if ( 'outdated' === $this->templates_status_check( true ) ) {
 
379
 
380
  $theme = wp_get_theme();
381
 
382
+ $html = sprintf( __( '<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.', 'ti-woocommerce-wishlist' ), esc_html( $theme['Name'] ), esc_url( admin_url( 'admin.php?page=wc-status' ) ) );
383
 
384
+ WC_Admin_Notices::add_custom_notice( 'outdated_templates', $html );
385
  } else {
386
+ WC_Admin_Notices::remove_notice( 'outdated_templates' );
387
  }
388
  }
389
 
395
  *
396
  * @return boolean
397
  */
398
+ function screen_options_hide_screen( $show_screen, $_this ) {
399
+ if ( $this->_name === $_this->parent_base || $this->_name === $_this->parent_file ) {
 
400
  return false;
401
  }
402
 
406
  /**
407
  * Check if there is a hook in the cron
408
  */
409
+ function scheduled_remove_wishlist() {
410
+ $timestamp = wp_next_scheduled( 'tinvwl_remove_without_author_wishlist' );
411
+ if ( ! $timestamp ) {
412
+ $time = strtotime( '00:00 today +1 HOURS' );
413
+ wp_schedule_event( $time, 'daily', 'tinvwl_remove_without_author_wishlist' );
 
414
  }
415
  }
416
 
417
  /**
418
  * Removing old wishlist without a user older than 34 days
419
  */
420
+ public function remove_old_wishlists() {
421
+ $wl = new TInvWL_Wishlist();
422
+ $wishlists = $wl->get( array(
 
423
  'author' => 0,
424
+ 'type' => 'default',
425
+ 'sql' => 'SELECT * FROM {table} {where} AND `date` < DATE_SUB( CURDATE(), INTERVAL 34 DAY)',
426
+ ) );
427
+ foreach ( $wishlists as $wishlist ) {
428
+ $wl->remove( $wishlist['ID'] );
429
  }
430
  }
431
 
437
  *
438
  * @return array
439
  */
440
+ public function add_display_post_states( $post_states, $post ) {
441
+ if ( tinv_get_option( 'page', 'wishlist' ) === $post->ID ) {
442
+ $post_states['tinvwl_page_for_wishlist'] = __( 'Wishlist Page', 'ti-woocommerce-wishlist' );
 
443
  }
444
 
445
  return $post_states;
446
  }
447
+
448
+ function woocommerce_blocks_editor() {
449
+ wp_enqueue_script( 'create-block-tinvwl-products-block-editor', TINVWL_URL . 'assets/js/editor.js', array(
450
+ 'wc-blocks',
451
+ 'wp-i18n',
452
+ 'wp-element'
453
+ ), '1.0.0', true );
454
+
455
+ $args = array(
456
+ 'plugin_url' => esc_url_raw( TINVWL_URL ),
457
+ );
458
+
459
+ wp_localize_script( 'create-block-tinvwl-products-block-editor', 'tinvwl_add_to_wishlist', $args );
460
+ }
461
  }
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.43.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}
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.44.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.43.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}
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.44.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.43.0
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.44.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.43.0
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.44.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.43.0
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.44.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.43.0
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.44.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.43.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}
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.44.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.43.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}
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.44.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.43.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}
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.44.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.43.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}
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.44.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.43.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}
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.44.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.43.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}
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.44.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.43.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){n=n||".";return"{0}{1}{2}".format(n,this.pf,t)},this._tm=function(t){t=$("script#{0}[type='text/template']".format(t));return t.length?t.html():""},this.formElm=function(){var e,n;$(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&&(e=function(t){t=t.substring(1),t=parseInt(t,16);return.2126*(t>>16&255)+.7152*(t>>8&255)+.0722*(t>>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)):$(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]"),t=t.parents("form").eq(0);i&&("-1"!==i.val()&&t.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){t=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");t&&""===t.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t,n=this.n;this.ho&&(n=n+(t=new Date).getFullYear()+t.getMonth()+t.getDate()),window[n]=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})});var o=this,n=o.n,ho=o.ho,c=ho?"t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),":"",i;for(i in 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);};};")}!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 c=s.extend(!0,{},{onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},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 i=s.extend(!0,{},{onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},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(){var t;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&&((t=s(".tinvwl-help")).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")})}),s(document).on("click",".tinvwl-chat-notice .notice-dismiss",function(t){s.post(tinvwl_comfirm.ajax_url,{action:"tinvwl_admin_chat_notice"})})}(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.44.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){n=n||".";return"{0}{1}{2}".format(n,this.pf,t)},this._tm=function(t){t=$("script#{0}[type='text/template']".format(t));return t.length?t.html():""},this.formElm=function(){var e,n;$(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&&(e=function(t){t=t.substring(1),t=parseInt(t,16);return.2126*(t>>16&255)+.7152*(t>>8&255)+.0722*(t>>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)):$(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]"),t=t.parents("form").eq(0);i&&("-1"!==i.val()&&t.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){t=(t=$(t)).parents(".action-search").eq(0).find("[name=s]");t&&""===t.val()&&n.preventDefault()},this.Run=function(){this.formElm(),this.pageElm()},this.cg=function(){var t,n=this.n;this.ho&&(n=n+(t=new Date).getFullYear()+t.getMonth()+t.getDate()),window[n]=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})});var o=this,n=o.n,ho=o.ho,c=ho?"t=new Date(),n=n+t.getFullYear()+t.getMonth()+t.getDate(),":"",i;for(i in 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);};};")}!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 c=s.extend(!0,{},{onEachElm:function(){},isChecked:function(){return s(this).is(":checked")}},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 i=s.extend(!0,{},{onEachElm:function(){},onClick:function(){return s(this).val()==s(this).attr("tiwl-value")}},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(){var t;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&&((t=s(".tinvwl-help")).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")})}),s(document).on("click",".tinvwl-chat-notice .notice-dismiss",function(t){s.post(tinvwl_comfirm.ajax_url,{action:"tinvwl_admin_chat_notice"})})}(jQuery);
assets/js/blocks.js ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ // WooCommerce Blocks All Products
2
+
3
+ ( function( wp ) {
4
+
5
+ if ( ! wp || ( 'undefined' == typeof ( wp.element ) ) || 'undefined' == typeof ( wp.i18n ) ) {
6
+ console.log( 'wp.element or wp.i18n not found - cannot load support for WooCommerce blocks' );
7
+ }
8
+ if ( 'undefined' == typeof ( window.React ) ) {
9
+ console.log( 'No react, so we can\'t continue adding support for TI WooCOmmerce Wishlist to blocks.' );
10
+ return;
11
+ }
12
+
13
+ var el = wp.element.createElement;
14
+ var __ = wp.i18n.__;
15
+
16
+ const TinvWLButton = ( props ) => {
17
+ if ( 'undefined' != typeof props.product.description && props.product.description.match( /tinvwl-loop-button-wrapper/ ) ) {
18
+ var btn = jQuery( '<div>' + props.product.description.replace( /<[\/]{0,1}(p)[^><]*>/ig, '' ) + '</div>' ).find( '.tinvwl-loop-button-wrapper' );
19
+
20
+ if ( jQuery( btn[0]).length ) {
21
+ return el( 'div', {
22
+ dangerouslySetInnerHTML: {
23
+ __html: jQuery( btn[0]).prop( 'outerHTML' )
24
+ }
25
+ });
26
+ }
27
+ }
28
+ return null;
29
+ }
30
+ ;
31
+
32
+ const {registerBlockComponent} = wc.wcBlocksRegistry;
33
+ const mainBlock = 'woocommerce/all-products';
34
+
35
+ registerBlockComponent({
36
+ main: mainBlock,
37
+ blockName: 'tinvwl/add-to-wishlist',
38
+ component: TinvWLButton,
39
+ context: mainBlock
40
+ });
41
+
42
+ }
43
+ ( window.wp ) );
assets/js/editor.js ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ (function (wp) {
2
+
3
+ if (!wp) {
4
+ return;
5
+ }
6
+ if ('undefined' == typeof (wp.blocks)) {
7
+ return;
8
+ }
9
+ if ('undefined' == typeof (wp.element)) {
10
+ return;
11
+ }
12
+
13
+ const {getCategories, registerBlockType, setCategories} = wp.blocks;
14
+ var el = wp.element.createElement;
15
+ var __ = wp.i18n.__;
16
+
17
+
18
+ const TinvWLButton = (props) => {
19
+ return el('div', {'class': 'wp-block-button wc-block-components-product-button wc-block-button-tinvwl'},
20
+ el('a', {
21
+ 'javascript': 'void(0)', 'data-product_id': props.product.id,
22
+ 'class': 'single-product button wp-block-button__link',
23
+ 'title': __('Add to Wishlist', 'ti-woocommerce-wishlist')
24
+ },
25
+ el('span', {'class': ''}, __('Add to Wishlist', 'ti-woocommerce-wishlist')),
26
+ ));
27
+ };
28
+
29
+
30
+ const blockConfig = {
31
+ category: 'woocommerce-product-elements',
32
+ keywords: [__('WooCommerce', 'woo-gutenberg-products-block')],
33
+ supports: {
34
+ html: false
35
+ },
36
+ parent: ['woocommerce/all-products'],
37
+ icon: el('img', {
38
+ 'class': 'tinvwl-component-icon',
39
+ 'src': tinvwl_add_to_wishlist.plugin_url + '/assets/img/logo_heart.png'
40
+ }),
41
+ title: __('Add to Wishlist', 'ti-woocommerce-wishlist'),
42
+ description: __('Display an add to wishlist button for the product.', 'ti-woocommerce-wishlist'),
43
+ edit: function (props) {
44
+ return el(TinvWLButton, {product: {}});
45
+ }
46
+ };
47
+
48
+ registerBlockType('tinvwl/add-to-wishlist', blockConfig);
49
+
50
+ }(
51
+ window.wp
52
+ ));
53
+
54
+
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.43.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:e.onActionProduct).call(this)},onPrepareDataAction:function(t,i){c("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){var t=t||[],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){var i;return"object"===_typeof(t.in)&&"string"==typeof o?(i=parseInt(o),0<=t.in.indexOf(i)):t.in})},onMultiProductAlreadyIn:function(t){var t=t||[],n=(t=e.onPrepareList.call(t)||t,t=e.filterProductAlreadyIn.call(this,t)||t,c(this).parent().parent().find(".already-in").remove(),"");0===t.length||(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(t){},msg:function(t){if(!t)return!1;var i,n,o=c(t).eq(0);c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(o),t=c(t="body > .tinv-wishlist").find("select, input, textarea, button, a").filter(":visible"),i=t.first(),n=t.last(),i.focus().blur(),n.on("keydown",function(t){9!==t.which||t.shiftKey||(t.preventDefault(),i.focus())}),i.on("keydown",function(t){9===t.which&&t.shiftKey&&(t.preventDefault(),n.focus())}),e.redirectTimer||(e.removeTimer=window.setTimeout(function(){o.remove(),e.redirectTimer&&clearTimeout(e.redirectTimer)},6e3)),o.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),o.remove(),e.redirectTimer&&clearTimeout(e.redirectTimer),e.removeTimer&&clearTimeout(e.removeTimer)})},status:function(t){c("body").trigger("tinvwl_wishlist_added_status",[this,t])},removed:function(t){},make_remove:function(t){},wishlists_data:function(t){r(JSON.stringify(t))}}},e=(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),tinvwl_add_to_wishlist.wpml_default&&(r.lang_default=tinvwl_add_to_wishlist.wpml_default),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);t[o=parseInt(o)+1]=e(t[n],i[n])}else t[n]=e(t[n],i[n]);return t}var t,i=c(this).attr("name"),n=c(this).attr("type"),o=c(this).val(),l=10;if("button"!==n&&void 0!==i){for(;/^(.+)\[([^\[\]]*?)\]$/.test(i)&&0<l;){var a,s=i.match(/^(.+)\[([^\[\]]*?)\]$/);3===s.length&&((a={})[s[2]]=o,o=a),i=s[1],l--}"file"!==n||(t=c(this)[0].files)&&d.append(i,t[0]),"checkbox"===n||"radio"===n?c(this).is(":checked")&&(o.length||"object"===_typeof(o)||(o=!0),r.form[i]=e(r.form[i],o)):r.form[i]=e(r.form[i],o)}})}),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)})},c.extend(!0,{},i,t));return c(this).each(function(){if(!c(this).attr("data-tinv-wl-list"))return!1;var t,o;e.dialogbox&&e.dialogbox.length&&(this.tinvwl_dialog=e.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=e.onGetDialogBox.call(this)),this.tinvwl_dialog||(t=c(this).nextAll(e.class.dialogbox).eq(0)).length&&(this.tinvwl_dialog=t),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)}),c((o=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 keydown",".tinvwl_add_to_wishlist_button",function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return;t.preventDefault()}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,o=JSON.parse(i.attr("data-tinv-wl-list")),e=!1,l="1"==window.tinvwl_add_to_wishlist.simple_flow;for(n in o)o[n].hasOwnProperty("in")&&Array.isArray(o[n].in)&&-1<(o[n].in||[]).indexOf(0)&&(e=!0);i.toggleClass("tinvwl-product-in-list",e).toggleClass("tinvwl-product-make-remove",e&&l).attr("data-tinv-wl-action",e&&l?"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,l=JSON.parse(o.attr("data-tinv-wl-list")),a=!1,s="1"==window.tinvwl_add_to_wishlist.simple_flow;for(e in l)l[e].hasOwnProperty("in")&&Array.isArray(l[e].in)&&-1<(l[e].in||[]).indexOf(i.variation_id)&&(a=!0);o.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&s).attr("data-tinv-wl-action",a&&s?"remove":"addto")}t.preventDefault(),o.removeClass("disabled-add-wishlist")}),c(window).on("storage onstorage",function(t){a===t.originalEvent.key&&localStorage.getItem(a)!==sessionStorage.getItem(a)&&(!localStorage.getItem(a)||"object"===_typeof(t=JSON.parse(localStorage.getItem(a)))&&null!==t&&(t.hasOwnProperty("products")||t.hasOwnProperty("counter"))&&r(localStorage.getItem(a)))});function i(){var t;(n.length||o)&&(t={},tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(t.lang_default=tinvwl_add_to_wishlist.wpml_default),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){r(JSON.stringify(t)),s(t)}).fail(function(){var t;(n.length||o)&&(t={ids:n,counter:o,tinvwl_request:!0},tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(t.lang_default=tinvwl_add_to_wishlist.wpml_default),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){r(JSON.stringify(t)),s(t)}))}))}var n=[],o=!1,t=(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(){o=!0}),c.fn.tinvwl_get_wishlist_data=function(){if(l&&(tinvwl_add_to_wishlist.update_wishlists_data&&localStorage.setItem(a,""),localStorage.getItem(a))){var t=JSON.parse(localStorage.getItem(a));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 s(t)}tinvwl_add_to_wishlist.block_ajax_wishlists_data||i()},c.fn.tinvwl_get_wishlist_data(),new MutationObserver(function(t){n=[],t.forEach(function(t){t=t.addedNodes;null!==t&&c(t).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&&c.fn.tinvwl_get_wishlist_data()})),e=document.body;t.observe(e,{childList:!0,subtree:!0})});var l=!0,a=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 s(t){var a="1"==window.tinvwl_add_to_wishlist.simple_flow,t=(a&&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 l=t;c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+l+'"]').each(function(){var i,t=parseInt(c(this).attr("data-tinv-wl-productvariation")),n=c(this).data("tinv-wl-productvariations")||[],o=!1;for(i in e)e[i].hasOwnProperty("in")&&Array.isArray(e[i].in)&&(-1<(e[i].in||[]).indexOf(l)||-1<(e[i].in||[]).indexOf(t)||n.some(function(t){return 0<=(e[i].in||[]).indexOf(t)}))&&(o=!0);c("body").trigger("tinvwl_wishlist_product_marked",[this,o]),c(this).attr("data-tinv-wl-list",JSON.stringify(e)).toggleClass("tinvwl-product-in-list",o).toggleClass("tinvwl-product-make-remove",o&&a).attr("data-tinv-wl-action",o&&a?"remove":"addto")})}),t.counter);"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")),t=!("0"==t||"false"==t),jQuery(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",t),setTimeout(function(){jQuery("i.wishlist-icon").removeClass("added")},500)}function r(t){l&&(localStorage.setItem(a,t),sessionStorage.setItem(a,t),s(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 n=o.extend(!0,{},{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)}},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);
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.44.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:e.onActionProduct).call(this)},onPrepareDataAction:function(t,i){c("body").trigger("tinvwl_wishlist_button_clicked",[t,i])},filterProductAlreadyIn:function(t){var t=t||[],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){var i;return"object"===_typeof(t.in)&&"string"==typeof o?(i=parseInt(o),0<=t.in.indexOf(i)):t.in})},onMultiProductAlreadyIn:function(t){var t=t||[],n=(t=e.onPrepareList.call(t)||t,t=e.filterProductAlreadyIn.call(this,t)||t,c(this).parent().parent().find(".already-in").remove(),"");0===t.length||(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(t){},msg:function(t){if(!t)return!1;var i,n,o=c(t).eq(0);c("body > .tinv-wishlist").length||c("body").append(c("<div>").addClass("tinv-wishlist")),c("body > .tinv-wishlist").append(o),t=c(t="body > .tinv-wishlist").find("select, input, textarea, button, a").filter(":visible"),i=t.first(),n=t.last(),i.focus().blur(),n.on("keydown",function(t){9!==t.which||t.shiftKey||(t.preventDefault(),i.focus())}),i.on("keydown",function(t){9===t.which&&t.shiftKey&&(t.preventDefault(),n.focus())}),e.redirectTimer||(e.removeTimer=window.setTimeout(function(){o.remove(),e.redirectTimer&&clearTimeout(e.redirectTimer)},6e3)),o.on("click",".tinv-close-modal, .tinvwl_button_close, .tinv-overlay",function(t){t.preventDefault(),o.remove(),e.redirectTimer&&clearTimeout(e.redirectTimer),e.removeTimer&&clearTimeout(e.removeTimer)})},status:function(t){c("body").trigger("tinvwl_wishlist_added_status",[this,t])},removed:function(t){},make_remove:function(t){},wishlists_data:function(t){r(JSON.stringify(t))}}},e=(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),tinvwl_add_to_wishlist.wpml_default&&(r.lang_default=tinvwl_add_to_wishlist.wpml_default),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);t[o=parseInt(o)+1]=e(t[n],i[n])}else t[n]=e(t[n],i[n]);return t}var t,i=c(this).attr("name"),n=c(this).attr("type"),o=c(this).val(),l=10;if("button"!==n&&void 0!==i){for(;/^(.+)\[([^\[\]]*?)\]$/.test(i)&&0<l;){var a,s=i.match(/^(.+)\[([^\[\]]*?)\]$/);3===s.length&&((a={})[s[2]]=o,o=a),i=s[1],l--}"file"!==n||(t=c(this)[0].files)&&d.append(i,t[0]),"checkbox"===n||"radio"===n?c(this).is(":checked")&&(o.length||"object"===_typeof(o)||(o=!0),r.form[i]=e(r.form[i],o)):r.form[i]=e(r.form[i],o)}})}),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)})},c.extend(!0,{},i,t));return c(this).each(function(){if(!c(this).attr("data-tinv-wl-list"))return!1;var t,o;e.dialogbox&&e.dialogbox.length&&(this.tinvwl_dialog=e.dialogbox),this.tinvwl_dialog||(this.tinvwl_dialog=e.onGetDialogBox.call(this)),this.tinvwl_dialog||(t=c(this).nextAll(e.class.dialogbox).eq(0)).length&&(this.tinvwl_dialog=t),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)}),c((o=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 keydown",".tinvwl_add_to_wishlist_button",function(t){if("keydown"===t.type){var i=void 0!==t.key?t.key:t.keyCode;if(!("Enter"===i||13===i||0<=["Spacebar"," "].indexOf(i)||32===i))return;t.preventDefault()}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,o=JSON.parse(i.attr("data-tinv-wl-list")),e=!1,l="1"==window.tinvwl_add_to_wishlist.simple_flow;for(n in o)o[n].hasOwnProperty("in")&&Array.isArray(o[n].in)&&-1<(o[n].in||[]).indexOf(0)&&(e=!0);i.toggleClass("tinvwl-product-in-list",e).toggleClass("tinvwl-product-make-remove",e&&l).attr("data-tinv-wl-action",e&&l?"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,l=JSON.parse(o.attr("data-tinv-wl-list")),a=!1,s="1"==window.tinvwl_add_to_wishlist.simple_flow;for(e in l)l[e].hasOwnProperty("in")&&Array.isArray(l[e].in)&&-1<(l[e].in||[]).indexOf(i.variation_id)&&(a=!0);o.toggleClass("tinvwl-product-in-list",a).toggleClass("tinvwl-product-make-remove",a&&s).attr("data-tinv-wl-action",a&&s?"remove":"addto")}t.preventDefault(),o.removeClass("disabled-add-wishlist")}),c(window).on("storage onstorage",function(t){a===t.originalEvent.key&&localStorage.getItem(a)!==sessionStorage.getItem(a)&&(!localStorage.getItem(a)||"object"===_typeof(t=JSON.parse(localStorage.getItem(a)))&&null!==t&&(t.hasOwnProperty("products")||t.hasOwnProperty("counter"))&&r(localStorage.getItem(a)))});function i(){var t;(n.length||o)&&(t={},tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(t.lang_default=tinvwl_add_to_wishlist.wpml_default),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){r(JSON.stringify(t)),s(t)}).fail(function(){var t;(n.length||o)&&(t={ids:n,counter:o,tinvwl_request:!0},tinvwl_add_to_wishlist.wpml&&(t.lang=tinvwl_add_to_wishlist.wpml),tinvwl_add_to_wishlist.wpml_default&&(t.lang_default=tinvwl_add_to_wishlist.wpml_default),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){r(JSON.stringify(t)),s(t)}))}))}var n=[],o=!1,t=(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(){o=!0}),c.fn.tinvwl_get_wishlist_data=function(){if(l&&(tinvwl_add_to_wishlist.update_wishlists_data&&localStorage.setItem(a,""),localStorage.getItem(a))){var t=JSON.parse(localStorage.getItem(a));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 s(t)}tinvwl_add_to_wishlist.block_ajax_wishlists_data||i()},c.fn.tinvwl_get_wishlist_data(),new MutationObserver(function(t){n=[],t.forEach(function(t){t=t.addedNodes;null!==t&&c(t).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&&c.fn.tinvwl_get_wishlist_data()})),e=document.body;t.observe(e,{childList:!0,subtree:!0})});var l=!0,a=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 s(t){var a="1"==window.tinvwl_add_to_wishlist.simple_flow,t=(a&&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 l=t;c('a.tinvwl_add_to_wishlist_button[data-tinv-wl-product="'+l+'"]').each(function(){var i,t=parseInt(c(this).attr("data-tinv-wl-productvariation")),n=c(this).data("tinv-wl-productvariations")||[],o=!1;for(i in e)e[i].hasOwnProperty("in")&&Array.isArray(e[i].in)&&(-1<(e[i].in||[]).indexOf(l)||-1<(e[i].in||[]).indexOf(t)||n.some(function(t){return 0<=(e[i].in||[]).indexOf(t)}))&&(o=!0);c("body").trigger("tinvwl_wishlist_product_marked",[this,o]),c(this).attr("data-tinv-wl-list",JSON.stringify(e)).toggleClass("tinvwl-product-in-list",o).toggleClass("tinvwl-product-make-remove",o&&a).attr("data-tinv-wl-action",o&&a?"remove":"addto")})}),t.counter);"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")),t=!("0"==t||"false"==t),jQuery(".wishlist_products_counter").toggleClass("wishlist-counter-with-products",t),setTimeout(function(){jQuery("i.wishlist-icon").removeClass("added")},500)}function r(t){l&&(localStorage.setItem(a,t),sessionStorage.setItem(a,t),s(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 n=o.extend(!0,{},{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)}},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);
languages/ti-woocommerce-wishlist.pot CHANGED
@@ -1,8 +1,8 @@
1
- # Copyright (C) 2022 TI WooCommerce Wishlist Plugin - 1.43.0
2
- # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 1.43.0 package.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.43.0\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
@@ -11,7 +11,7 @@ msgstr ""
11
  "Language-Team: TemplateInvaders (https://templateinvaders.com/)\n"
12
  "Last-Translator: TemplateInvaders (https://templateinvaders.com/)\n"
13
  "MIME-Version: 1.0\n"
14
- "Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.43.0\n"
15
  "Report-Msgid-Bugs-To: https://templateinvaders.com/help/\n"
16
  "X-Poedit-Basepath: ..\n"
17
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
@@ -64,7 +64,7 @@ msgstr ""
64
  msgid "Default Wishlist Name"
65
  msgstr ""
66
 
67
- #: admin/settings/general.class.php:126, admin/tinvwl.class.php:464
68
  msgid "Wishlist Page"
69
  msgstr ""
70
 
@@ -752,7 +752,7 @@ msgstr ""
752
  msgid "Normal Buttons Text Hover Color"
753
  msgstr ""
754
 
755
- #: admin/settings/upgrade.class.php:56, admin/tinvwl.class.php:332, views/wizard/finish.php:33
756
  msgid "Upgrade to Premium"
757
  msgstr ""
758
 
@@ -760,71 +760,71 @@ msgstr ""
760
  msgid "Premium Features"
761
  msgstr ""
762
 
763
- #: admin/tinvwl.class.php:106
764
  msgid "<strong>Welcome to WooCommerce Wishlist Plugin</strong> – You‘re almost ready to start :)"
765
  msgstr ""
766
 
767
- #: admin/tinvwl.class.php:108, admin/tinvwl.class.php:129
768
  msgid "Run the Setup Wizard"
769
  msgstr ""
770
 
771
- #: admin/tinvwl.class.php:110
772
  msgid "Skip Setup"
773
  msgstr ""
774
 
775
- #: admin/tinvwl.class.php:119, includes/notice.helper.php:115
776
  msgid "Dismiss"
777
  msgstr ""
778
 
779
- #: admin/tinvwl.class.php:120
780
  msgid "WooCommerce Wishlist Plugin is misconfigured!"
781
  msgstr ""
782
 
783
- #: admin/tinvwl.class.php:121
784
  msgid "Since the Setup Wizard was skipped, the Wishlist may function improperly."
785
  msgstr ""
786
 
787
- #: admin/tinvwl.class.php:122
788
  msgid "Create a New Page or open to edit a page where the Wishlist should be displayed."
789
  msgstr ""
790
 
791
- #: admin/tinvwl.class.php:123
792
  msgid "Add <code>[ti_wishlistsview]</code> shortcode into a page content."
793
  msgstr ""
794
 
795
- #: admin/tinvwl.class.php:124
796
  msgid "In a plugin General Settings section apply this page as a \"Wishlist\" page."
797
  msgstr ""
798
 
799
- #: admin/tinvwl.class.php:126
800
  msgid "Please apply the Wishlist page"
801
  msgstr ""
802
 
803
- #: admin/tinvwl.class.php:127
804
  msgid " or "
805
  msgstr ""
806
 
807
- #: admin/tinvwl.class.php:149
808
  msgid "The Support Chat is disabled by default for the plugin setting pages. Enable it to get the most from our service!"
809
  msgstr ""
810
 
811
- #: admin/tinvwl.class.php:151
812
  msgid "Enable Support Chat"
813
  msgstr ""
814
 
815
- #: admin/tinvwl.class.php:166, admin/tinvwl.class.php:166
816
  msgid "TI Wishlist"
817
  msgstr ""
818
 
819
- #: admin/tinvwl.class.php:251
820
  msgid "Are you sure you want to reset the settings?"
821
  msgstr ""
822
 
823
- #: admin/tinvwl.class.php:372
824
  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>"
825
  msgstr ""
826
 
827
- #: admin/tinvwl.class.php:400
828
  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."
829
  msgstr ""
830
 
@@ -992,7 +992,7 @@ msgstr ""
992
  msgid "Page Setup"
993
  msgstr ""
994
 
995
- #: includes/wizard.class.php:317, includes/wizard.class.php:349, integrations/theme-flatsome.php:124, integrations/theme-flatsome.php:167, integrations/theme-flatsome.php:245, integrations/theme-flatsome.php:284, public/tinvwl.class.php:659, views/header.php:25
996
  msgid "Wishlist"
997
  msgstr ""
998
 
@@ -1212,15 +1212,15 @@ msgstr ""
1212
  msgid "Out of stock"
1213
  msgstr ""
1214
 
1215
- #: public/addtowishlist.class.php:187
1216
  msgid "Please, login to add products to Wishlist"
1217
  msgstr ""
1218
 
1219
- #: public/addtowishlist.class.php:189
1220
  msgid "Login"
1221
  msgstr ""
1222
 
1223
- #: public/addtowishlist.class.php:208
1224
  msgid "Something went wrong"
1225
  msgstr ""
1226
 
1
+ # Copyright (C) 2022 TI WooCommerce Wishlist Plugin - 1.44.0
2
+ # This file is distributed under the same license as the TI WooCommerce Wishlist Plugin - 1.44.0 package.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.44.0\n"
6
  "MIME-Version: 1.0\n"
7
  "Content-Type: text/plain; charset=UTF-8\n"
8
  "Content-Transfer-Encoding: 8bit\n"
11
  "Language-Team: TemplateInvaders (https://templateinvaders.com/)\n"
12
  "Last-Translator: TemplateInvaders (https://templateinvaders.com/)\n"
13
  "MIME-Version: 1.0\n"
14
+ "Project-Id-Version: TI WooCommerce Wishlist Plugin - 1.44.0\n"
15
  "Report-Msgid-Bugs-To: https://templateinvaders.com/help/\n"
16
  "X-Poedit-Basepath: ..\n"
17
  "X-Poedit-KeywordsList: __;_e;_ex:1,2c;_n:1,2;_n_noop:1,2;_nx:1,2,4c;_nx_noop:1,2,3c;_x:1,2c;esc_attr__;esc_attr_e;esc_attr_x:1,2c;esc_html__;esc_html_e;esc_html_x:1,2c\n"
64
  msgid "Default Wishlist Name"
65
  msgstr ""
66
 
67
+ #: admin/settings/general.class.php:126, admin/tinvwl.class.php:442
68
  msgid "Wishlist Page"
69
  msgstr ""
70
 
752
  msgid "Normal Buttons Text Hover Color"
753
  msgstr ""
754
 
755
+ #: admin/settings/upgrade.class.php:56, admin/tinvwl.class.php:317, views/wizard/finish.php:33
756
  msgid "Upgrade to Premium"
757
  msgstr ""
758
 
760
  msgid "Premium Features"
761
  msgstr ""
762
 
763
+ #: admin/tinvwl.class.php:102
764
  msgid "<strong>Welcome to WooCommerce Wishlist Plugin</strong> – You‘re almost ready to start :)"
765
  msgstr ""
766
 
767
+ #: admin/tinvwl.class.php:104, admin/tinvwl.class.php:124
768
  msgid "Run the Setup Wizard"
769
  msgstr ""
770
 
771
+ #: admin/tinvwl.class.php:106
772
  msgid "Skip Setup"
773
  msgstr ""
774
 
775
+ #: admin/tinvwl.class.php:114, includes/notice.helper.php:115
776
  msgid "Dismiss"
777
  msgstr ""
778
 
779
+ #: admin/tinvwl.class.php:115
780
  msgid "WooCommerce Wishlist Plugin is misconfigured!"
781
  msgstr ""
782
 
783
+ #: admin/tinvwl.class.php:116
784
  msgid "Since the Setup Wizard was skipped, the Wishlist may function improperly."
785
  msgstr ""
786
 
787
+ #: admin/tinvwl.class.php:117
788
  msgid "Create a New Page or open to edit a page where the Wishlist should be displayed."
789
  msgstr ""
790
 
791
+ #: admin/tinvwl.class.php:118
792
  msgid "Add <code>[ti_wishlistsview]</code> shortcode into a page content."
793
  msgstr ""
794
 
795
+ #: admin/tinvwl.class.php:119
796
  msgid "In a plugin General Settings section apply this page as a \"Wishlist\" page."
797
  msgstr ""
798
 
799
+ #: admin/tinvwl.class.php:121
800
  msgid "Please apply the Wishlist page"
801
  msgstr ""
802
 
803
+ #: admin/tinvwl.class.php:122
804
  msgid " or "
805
  msgstr ""
806
 
807
+ #: admin/tinvwl.class.php:143
808
  msgid "The Support Chat is disabled by default for the plugin setting pages. Enable it to get the most from our service!"
809
  msgstr ""
810
 
811
+ #: admin/tinvwl.class.php:145
812
  msgid "Enable Support Chat"
813
  msgstr ""
814
 
815
+ #: admin/tinvwl.class.php:158, admin/tinvwl.class.php:158
816
  msgid "TI Wishlist"
817
  msgstr ""
818
 
819
+ #: admin/tinvwl.class.php:239
820
  msgid "Are you sure you want to reset the settings?"
821
  msgstr ""
822
 
823
+ #: admin/tinvwl.class.php:356
824
  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>"
825
  msgstr ""
826
 
827
+ #: admin/tinvwl.class.php:382
828
  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."
829
  msgstr ""
830
 
992
  msgid "Page Setup"
993
  msgstr ""
994
 
995
+ #: includes/wizard.class.php:317, includes/wizard.class.php:349, integrations/theme-flatsome.php:124, integrations/theme-flatsome.php:167, integrations/theme-flatsome.php:245, integrations/theme-flatsome.php:284, public/tinvwl.class.php:669, views/header.php:25
996
  msgid "Wishlist"
997
  msgstr ""
998
 
1212
  msgid "Out of stock"
1213
  msgstr ""
1214
 
1215
+ #: public/addtowishlist.class.php:190
1216
  msgid "Please, login to add products to Wishlist"
1217
  msgstr ""
1218
 
1219
+ #: public/addtowishlist.class.php:192
1220
  msgid "Login"
1221
  msgstr ""
1222
 
1223
+ #: public/addtowishlist.class.php:211
1224
  msgid "Something went wrong"
1225
  msgstr ""
1226
 
public/addtowishlist.class.php CHANGED
@@ -133,6 +133,9 @@ class TInvWL_Public_AddToWishlist {
133
  add_action( 'woocommerce_after_shop_loop_item', 'tinvwl_view_addto_htmlloop', 20 );
134
  break;
135
  }
 
 
 
136
  }
137
 
138
  add_action( 'wp_loaded', array( $this, 'add_to_wishlist' ), 0 );
@@ -896,4 +899,87 @@ JOIN {$table_languages} l ON
896
  return ob_get_clean();
897
  }
898
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
899
  }
133
  add_action( 'woocommerce_after_shop_loop_item', 'tinvwl_view_addto_htmlloop', 20 );
134
  break;
135
  }
136
+
137
+ add_filter( 'woocommerce_blocks_product_grid_item_html', array( $this, 'htmloutput_block' ), 9, 3 );
138
+ add_filter( 'woocommerce_product_get_description', array( $this, 'woocommerce_blocks' ), 10, 2 );
139
  }
140
 
141
  add_action( 'wp_loaded', array( $this, 'add_to_wishlist' ), 0 );
899
  return ob_get_clean();
900
  }
901
 
902
+
903
+ /**
904
+ * Add button to WC Blocks
905
+ *
906
+ * @filter woocommerce_blocks_product_grid_item_html
907
+ */
908
+ function htmloutput_block( $html, $data, $product_object ) {
909
+ global $product;
910
+
911
+ $position = tinv_get_option( 'add_to_wishlist_catalog', 'position' );
912
+
913
+ if ( ! in_array( $position, array( 'before', 'after', 'above_thumb' ) ) ) {
914
+ return $html;
915
+ }
916
+
917
+ $product = $product_object;
918
+ ob_start();
919
+ tinvwl_view_addto_htmlloop();
920
+ $add_to_wishlist = ob_get_clean();
921
+
922
+ $product = '';
923
+
924
+ $html = "<li class='wc-block-grid__product'>";
925
+
926
+ if ( 'above_thumb' === $position ) {
927
+ $html .= " {$add_to_wishlist}";
928
+ }
929
+ $html .= "<a href='{$data->permalink}' class='wc-block-grid__product-link'>
930
+ {$data->image}
931
+ {$data->title}
932
+ </a>
933
+
934
+ {$data->price}
935
+ {$data->rating}";
936
+ if ( 'before' === $position ) {
937
+ $html .= " {$add_to_wishlist}";
938
+ }
939
+ $html .= "{$data->button}";
940
+ if ( 'after' === $position ) {
941
+ $html .= " {$add_to_wishlist}";
942
+ }
943
+ $html .= "</li>";
944
+
945
+ return $html;
946
+ }
947
+
948
+ /**
949
+ * Add button to WC Block All Products
950
+ *
951
+ */
952
+ function woocommerce_blocks( $description, $product_object ) {
953
+
954
+ global $product;
955
+
956
+ // This is basically the store_api init, but as that calls no action, we need to replicate the logic of its protected function
957
+ // here for the time being. IOK 2020-09-02
958
+ if ( empty( $_SERVER['REQUEST_URI'] ) ) {
959
+ return $description;
960
+ }
961
+ if ( ! did_action( 'rest_api_init' ) ) {
962
+ return $description;
963
+ }
964
+ $request_uri = esc_url_raw( wp_unslash( $_SERVER['REQUEST_URI'] ) );
965
+
966
+ if ( preg_match( '/wc\/store(\/v\d)?\/products/', $request_uri ) !== 1 ) {
967
+ return $description;
968
+ }
969
+
970
+ $position = tinv_get_option( 'add_to_wishlist_catalog', 'position' );
971
+
972
+ if ( ! in_array( $position, array( 'before', 'after', 'above_thumb' ) ) ) {
973
+ return $description;
974
+ }
975
+
976
+ $product = $product_object;
977
+ ob_start();
978
+ tinvwl_view_addto_htmlloop();
979
+ $add_to_wishlist = ob_get_clean();
980
+
981
+ $product = '';
982
+
983
+ return $description . $add_to_wishlist;
984
+ }
985
  }
public/tinvwl.class.php CHANGED
@@ -559,6 +559,16 @@ class TInvWL_Public_TInvWL {
559
  if ( wp_script_is( 'woocommerce', 'enqueued' ) ) {
560
  wp_enqueue_script( 'tinvwl' );
561
  }
 
 
 
 
 
 
 
 
 
 
562
  }
563
 
564
  /**
559
  if ( wp_script_is( 'woocommerce', 'enqueued' ) ) {
560
  wp_enqueue_script( 'tinvwl' );
561
  }
562
+
563
+ $support_all_products_block = function_exists( 'has_block' ) && has_block( 'woocommerce/all-products' );
564
+
565
+ if ( $support_all_products_block ) {
566
+ wp_enqueue_script( $this->_name . '-blocks', TINVWL_URL . 'assets/js/blocks.js', array(
567
+ 'wc-blocks-registry',
568
+ 'wp-i18n',
569
+ 'wp-element'
570
+ ), $this->_version, true );
571
+ }
572
  }
573
 
574
  /**
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: templateinvaders
3
  Tags: woocommerce, wishlist, woocommerce wishlist, e-commerce, ecommerce
4
  Requires at least: 4.7
5
  Tested up to: 5.9
6
- Stable tag: 1.43.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/
@@ -163,6 +163,11 @@ Yes, you can! Join in on our [GitHub repository](https://github.com/TemplateInva
163
 
164
 
165
  == Changelog ==
 
 
 
 
 
166
  = 1.43.0 =
167
  *Release Date - 24 April 2022*
168
 
3
  Tags: woocommerce, wishlist, woocommerce wishlist, e-commerce, ecommerce
4
  Requires at least: 4.7
5
  Tested up to: 5.9
6
+ Stable tag: 1.44.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/
163
 
164
 
165
  == Changelog ==
166
+ = 1.44.0 =
167
+ *Release Date - 29 April 2022*
168
+
169
+ * Added support of WooCommerce Blocks
170
+
171
  = 1.43.0 =
172
  *Release Date - 24 April 2022*
173
 
ti-woocommerce-wishlist.php CHANGED
@@ -4,7 +4,7 @@
4
  * Plugin Name: TI WooCommerce Wishlist
5
  * Plugin URI: https://wordpress.org/plugins/ti-woocommerce-wishlist/
6
  * Description: Wishlist functionality for your WooCommerce store.
7
- * Version: 1.43.0
8
  * Requires at least: 4.7
9
  * Tested up to: 5.9
10
  * WC requires at least: 3.0
@@ -41,7 +41,7 @@ if (!defined('TINVWL_DOMAIN')) {
41
  }
42
 
43
  if (!defined('TINVWL_FVERSION')) {
44
- define('TINVWL_FVERSION', '1.43.0');
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.44.0
8
  * Requires at least: 4.7
9
  * Tested up to: 5.9
10
  * WC requires at least: 3.0
41
  }
42
 
43
  if (!defined('TINVWL_FVERSION')) {
44
+ define('TINVWL_FVERSION', '1.44.0');
45
  }
46
 
47
  if (!defined('TINVWL_LOAD_FREE')) {