Tawk.To Live Chat - Version 0.5.3

Version Description

  • Fixed issues for checking enabled_visitor_recognition on embed script pre render.
Download this release

Release Info

Developer alvinsotawk
Plugin Icon 128x128 Tawk.To Live Chat
Version 0.5.3
Comparing to
See all releases

Code changes from version 0.5.2 to 0.5.3

Files changed (3) hide show
  1. readme.txt +4 -1
  2. tawkto.php +9 -12
  3. templates/widget.php +2 -2
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: tawkto
3
  Tags: tawk,tawk.to,tawkto,chat,free chat,livechat,chat widget,plugin,chat for web,chat online,chat software,free live chat,IM Chat,,live chat,live support,live web chat,online chat,online support,snapengage,wordpress chat,wordpress live chat
4
  Requires at least: 2.7
5
  Tested up to: 5.7
6
- Stable tag: 0.5.2
7
 
8
  (OFFICIAL tawk.to plugin) Instantly chat with visitors on your website with the free tawk.to chat widget.
9
  Website: [http://tawk.to](http://tawk.to)
@@ -55,6 +55,9 @@ Note: You will need a free tawk.to account : [Create one for free here!](https:/
55
 
56
  == Changelog ==
57
 
 
 
 
58
  = 0.5.2 =
59
  * Fixed checking of $customer_details variable.
60
  * Fixed undefined index issues on validating visibility options.
3
  Tags: tawk,tawk.to,tawkto,chat,free chat,livechat,chat widget,plugin,chat for web,chat online,chat software,free live chat,IM Chat,,live chat,live support,live web chat,online chat,online support,snapengage,wordpress chat,wordpress live chat
4
  Requires at least: 2.7
5
  Tested up to: 5.7
6
+ Stable tag: 0.5.3
7
 
8
  (OFFICIAL tawk.to plugin) Instantly chat with visitors on your website with the free tawk.to chat widget.
9
  Website: [http://tawk.to](http://tawk.to)
55
 
56
  == Changelog ==
57
 
58
+ = 0.5.3 =
59
+ * Fixed issues for checking enabled_visitor_recognition on embed script pre render.
60
+
61
  = 0.5.2 =
62
  * Fixed checking of $customer_details variable.
63
  * Fixed undefined index issues on validating visibility options.
tawkto.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Tawk.to Live Chat
4
  Plugin URI: https://www.tawk.to
5
  Description: Embeds Tawk.to live chat widget to your site
6
- Version: 0.5.2
7
  Author: Tawkto
8
  Text Domain: tawk-to-live-chat
9
  */
@@ -257,11 +257,16 @@ if(!class_exists('TawkTo')){
257
  return NULL;
258
  }
259
 
260
- public function embed_code($options) {
261
  $page_id = get_option('tawkto-embed-widget-page-id');
262
  $widget_id = get_option('tawkto-embed-widget-widget-id');
 
263
 
264
- $enable_visitor_recognition = $options['enable_visitor_recognition'];
 
 
 
 
265
 
266
  if ($enable_visitor_recognition) {
267
  $customer_details = $this->getCurrentCustomerDetails();
@@ -366,15 +371,7 @@ if(!class_exists('TawkTo')){
366
  }
367
 
368
  if ($display) {
369
- $options = array(
370
- 'enable_visitor_recognition' => true // default value
371
- );
372
-
373
- if (isset($vsibility['enable_visitor_recognition'])) {
374
- $options['enable_visitor_recognition'] = $vsibility['enable_visitor_recognition'] == 1;
375
- }
376
-
377
- $this->embed_code($options);
378
  }
379
  }
380
 
3
  Plugin Name: Tawk.to Live Chat
4
  Plugin URI: https://www.tawk.to
5
  Description: Embeds Tawk.to live chat widget to your site
6
+ Version: 0.5.3
7
  Author: Tawkto
8
  Text Domain: tawk-to-live-chat
9
  */
257
  return NULL;
258
  }
259
 
260
+ public function embed_code() {
261
  $page_id = get_option('tawkto-embed-widget-page-id');
262
  $widget_id = get_option('tawkto-embed-widget-widget-id');
263
+ $visibility = get_option('tawkto-visibility-options');
264
 
265
+ $enable_visitor_recognition = true; // default value
266
+
267
+ if (isset($visibility) && isset($visibility['enable_visitor_recognition'])) {
268
+ $enable_visitor_recognition = $visibility['enable_visitor_recognition'] == 1;
269
+ }
270
 
271
  if ($enable_visitor_recognition) {
272
  $customer_details = $this->getCurrentCustomerDetails();
371
  }
372
 
373
  if ($display) {
374
+ $this->embed_code();
 
 
 
 
 
 
 
 
375
  }
376
  }
377
 
templates/widget.php CHANGED
@@ -1,4 +1,4 @@
1
- <!--Start of Tawk.to Script (0.5.2)-->
2
  <script type="text/javascript">
3
  var Tawk_API=Tawk_API||{};
4
  <?php
@@ -16,4 +16,4 @@ s1.setAttribute('crossorigin','*');
16
  s0.parentNode.insertBefore(s1,s0);
17
  })();
18
  </script>
19
- <!--End of Tawk.to Script (0.5.2)-->
1
+ <!--Start of Tawk.to Script (0.5.3)-->
2
  <script type="text/javascript">
3
  var Tawk_API=Tawk_API||{};
4
  <?php
16
  s0.parentNode.insertBefore(s1,s0);
17
  })();
18
  </script>
19
+ <!--End of Tawk.to Script (0.5.3)-->