LiveChat – WP live chat plugin for WordPress - Version 4.4.10

Version Description

  • bug fixes
Download this release

Release Info

Developer livechat
Plugin Icon 128x128 LiveChat – WP live chat plugin for WordPress
Version 4.4.10
Comparing to
See all releases

Code changes from version 4.4.9 to 4.4.10

changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  == Changelog ==
2
 
 
 
 
3
  = 4.4.9 =
4
  * support for Elementor plugin
5
  * hide chat widget in Elementor preview
1
  == Changelog ==
2
 
3
+ = 4.4.10 =
4
+ * bug fixes
5
+
6
  = 4.4.9 =
7
  * support for Elementor plugin
8
  * hide chat widget in Elementor preview
livechat.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: LiveChat
4
  * Plugin URI: https://www.livechat.com/marketplace/apps/wordpress/
5
  * Description: Live chat software for live help, online sales and customer support. This plugin allows to quickly install LiveChat on any WordPress website.
6
- * Version: 4.4.9
7
  * Author: LiveChat
8
  * Author URI: https://www.livechat.com
9
  * Text Domain: wp-live-chat-software-for-wordpress
@@ -95,6 +95,19 @@ if ( ! function_exists( 'livechat_is_elementor' ) ) {
95
  }
96
  }
97
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  if ( is_admin() ) {
99
  require_once dirname( __FILE__ ) . '/plugin_files/LiveChatAdmin.class.php';
100
  \LiveChat\LiveChatAdmin::get_instance();
3
  * Plugin Name: LiveChat
4
  * Plugin URI: https://www.livechat.com/marketplace/apps/wordpress/
5
  * Description: Live chat software for live help, online sales and customer support. This plugin allows to quickly install LiveChat on any WordPress website.
6
+ * Version: 4.4.10
7
  * Author: LiveChat
8
  * Author URI: https://www.livechat.com
9
  * Text Domain: wp-live-chat-software-for-wordpress
95
  }
96
  }
97
 
98
+ if ( ! function_exists( 'livechat_is_elementor_preview_mode' ) ) {
99
+ /**
100
+ * Checks if website is in Elementor preview mode.
101
+ *
102
+ * @return bool
103
+ */
104
+ function livechat_is_elementor_preview_mode() {
105
+ return livechat_is_elementor()
106
+ && class_exists( '\Elementor\Plugin' )
107
+ && \Elementor\Plugin::$instance->preview->is_preview_mode();
108
+ }
109
+ }
110
+
111
  if ( is_admin() ) {
112
  require_once dirname( __FILE__ ) . '/plugin_files/LiveChatAdmin.class.php';
113
  \LiveChat\LiveChatAdmin::get_instance();
plugin_files/Services/Templates/ContactButtonWidgetTemplate.class.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Class ContactButtonWidgetTemplate
4
+ *
5
+ * @package LiveChat\Services\Templates
6
+ */
7
+
8
+ namespace LiveChat\Services\Templates;
9
+
10
+ use LiveChat\Services\TemplateParser;
11
+
12
+ /**
13
+ * Class ContactButtonWidgetTemplate
14
+ *
15
+ * @package LiveChat\Services\Templates
16
+ */
17
+ class ContactButtonWidgetTemplate extends Template {
18
+ /**
19
+ * Renders contact button widget for Elementor plugin.
20
+ *
21
+ * @return string
22
+ */
23
+ public function render() {
24
+ return $this->template_parser->parse_template( 'contact_button_widget.html.twig', array() );
25
+ }
26
+
27
+ /**
28
+ * Returns instance of ContactButtonWidgetTemplate class.
29
+ *
30
+ * @return ContactButtonWidgetTemplate|static
31
+ */
32
+ public static function create() {
33
+ return new static( TemplateParser::create( '../templates' ) );
34
+ }
35
+ }
plugin_files/Services/WidgetProvider.class.php CHANGED
@@ -53,11 +53,7 @@ class WidgetProvider {
53
  * Sets widget script.
54
  */
55
  public function set_widget() {
56
- if (
57
- livechat_is_elementor() &&
58
- class_exists( '\Elementor\Plugin' ) &&
59
- \Elementor\Plugin::$instance->preview->is_preview_mode()
60
- ) {
61
  return;
62
  }
63
 
53
  * Sets widget script.
54
  */
55
  public function set_widget() {
56
+ if ( livechat_is_elementor_preview_mode() ) {
 
 
 
 
57
  return;
58
  }
59
 
plugin_files/templates/contact_button_widget.html.twig ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ <div class="lc-contact-button-container">
2
+ <button>Contact us</button>
3
+ </div>
readme.txt CHANGED
@@ -1,7 +1,7 @@
1
  === LiveChat - WP live chat plugin for WordPress ===
2
  Contributors: LiveChat
3
  Tags: live chat, chat plugin, live chat plugin, wordpress live chat, wordpress chat,
4
- Stable tag: 4.4.9
5
  Requires PHP: 5.6
6
  Tested up to: 5.8
7
  Requires at least: 4.4
@@ -352,6 +352,9 @@ For more detailed instructions, go to the [live chat plugin page](https://www.li
352
 
353
  == Changelog ==
354
 
 
 
 
355
  = 4.4.9 =
356
  * support for Elementor plugin
357
  * hide chat widget in Elementor preview
1
  === LiveChat - WP live chat plugin for WordPress ===
2
  Contributors: LiveChat
3
  Tags: live chat, chat plugin, live chat plugin, wordpress live chat, wordpress chat,
4
+ Stable tag: 4.4.10
5
  Requires PHP: 5.6
6
  Tested up to: 5.8
7
  Requires at least: 4.4
352
 
353
  == Changelog ==
354
 
355
+ = 4.4.10 =
356
+ * bug fixes
357
+
358
  = 4.4.9 =
359
  * support for Elementor plugin
360
  * hide chat widget in Elementor preview
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInitc9e00ab76f34e1502e32ce443cc37a87::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitcceae03e413af29d224cad9e623d6194::getLoader();
vendor/composer/autoload_classmap.php CHANGED
@@ -6,8 +6,6 @@ $vendorDir = dirname(dirname(__FILE__));
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
9
- 'Elementor\\Plugin' => $baseDir . '/plugin_files/tests/services/WidgetProviderTest.class.php',
10
- 'Elementor\\Preview' => $baseDir . '/plugin_files/tests/services/WidgetProviderTest.class.php',
11
  'LiveChat\\Drivers\\HttpClient' => $baseDir . '/plugin_files/Drivers/HttpClient.class.php',
12
  'LiveChat\\Drivers\\HttpClientTest' => $baseDir . '/plugin_files/tests/drivers/HttpClientTest.class.php',
13
  'LiveChat\\Drivers\\WP_Error' => $baseDir . '/plugin_files/tests/drivers/HttpClientTest.class.php',
@@ -108,6 +106,8 @@ return array(
108
  'LiveChat\\Services\\Templates\\ChatWidgetScriptTemplateTest' => $baseDir . '/plugin_files/tests/services/templates/ChatWidgetScriptTemplateTest.class.php',
109
  'LiveChat\\Services\\Templates\\ConfirmIdentityNoticeTemplate' => $baseDir . '/plugin_files/Services/Templates/ConfirmIdentityNoticeTemplate.class.php',
110
  'LiveChat\\Services\\Templates\\ConnectNoticeTemplate' => $baseDir . '/plugin_files/Services/Templates/ConnectNoticeTemplate.class.php',
 
 
111
  'LiveChat\\Services\\Templates\\CustomerTrackingTemplate' => $baseDir . '/plugin_files/Services/Templates/CustomerTrackingTemplate.class.php',
112
  'LiveChat\\Services\\Templates\\CustomerTrackingTemplateTest' => $baseDir . '/plugin_files/tests/services/templates/CustomerTrackingTemplateTest.class.php',
113
  'LiveChat\\Services\\Templates\\DeactivationModalTemplate' => $baseDir . '/plugin_files/Services/Templates/DeactivationModalTemplate.class.php',
6
  $baseDir = dirname($vendorDir);
7
 
8
  return array(
 
 
9
  'LiveChat\\Drivers\\HttpClient' => $baseDir . '/plugin_files/Drivers/HttpClient.class.php',
10
  'LiveChat\\Drivers\\HttpClientTest' => $baseDir . '/plugin_files/tests/drivers/HttpClientTest.class.php',
11
  'LiveChat\\Drivers\\WP_Error' => $baseDir . '/plugin_files/tests/drivers/HttpClientTest.class.php',
106
  'LiveChat\\Services\\Templates\\ChatWidgetScriptTemplateTest' => $baseDir . '/plugin_files/tests/services/templates/ChatWidgetScriptTemplateTest.class.php',
107
  'LiveChat\\Services\\Templates\\ConfirmIdentityNoticeTemplate' => $baseDir . '/plugin_files/Services/Templates/ConfirmIdentityNoticeTemplate.class.php',
108
  'LiveChat\\Services\\Templates\\ConnectNoticeTemplate' => $baseDir . '/plugin_files/Services/Templates/ConnectNoticeTemplate.class.php',
109
+ 'LiveChat\\Services\\Templates\\ContactButtonWidgetTemplate' => $baseDir . '/plugin_files/Services/Templates/ContactButtonWidgetTemplate.class.php',
110
+ 'LiveChat\\Services\\Templates\\ContactButtonWidgetTemplateTest' => $baseDir . '/plugin_files/tests/services/templates/ContactButtonWidgetTemplateTest.class.php',
111
  'LiveChat\\Services\\Templates\\CustomerTrackingTemplate' => $baseDir . '/plugin_files/Services/Templates/CustomerTrackingTemplate.class.php',
112
  'LiveChat\\Services\\Templates\\CustomerTrackingTemplateTest' => $baseDir . '/plugin_files/tests/services/templates/CustomerTrackingTemplateTest.class.php',
113
  'LiveChat\\Services\\Templates\\DeactivationModalTemplate' => $baseDir . '/plugin_files/Services/Templates/DeactivationModalTemplate.class.php',
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInitc9e00ab76f34e1502e32ce443cc37a87
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInitc9e00ab76f34e1502e32ce443cc37a87
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInitc9e00ab76f34e1502e32ce443cc37a87', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInitc9e00ab76f34e1502e32ce443cc37a87', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
- call_user_func(\Composer\Autoload\ComposerStaticInitc9e00ab76f34e1502e32ce443cc37a87::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
+ class ComposerAutoloaderInitcceae03e413af29d224cad9e623d6194
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitcceae03e413af29d224cad9e623d6194', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitcceae03e413af29d224cad9e623d6194', 'loadClassLoader'));
28
 
29
  $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded());
30
  if ($useStaticLoader) {
31
  require_once __DIR__ . '/autoload_static.php';
32
 
33
+ call_user_func(\Composer\Autoload\ComposerStaticInitcceae03e413af29d224cad9e623d6194::getInitializer($loader));
34
  } else {
35
  $map = require __DIR__ . '/autoload_namespaces.php';
36
  foreach ($map as $namespace => $path) {
vendor/composer/autoload_static.php CHANGED
@@ -4,7 +4,7 @@
4
 
5
  namespace Composer\Autoload;
6
 
7
- class ComposerStaticInitc9e00ab76f34e1502e32ce443cc37a87
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'L' =>
@@ -29,8 +29,6 @@ class ComposerStaticInitc9e00ab76f34e1502e32ce443cc37a87
29
  );
30
 
31
  public static $classMap = array (
32
- 'Elementor\\Plugin' => __DIR__ . '/../..' . '/plugin_files/tests/services/WidgetProviderTest.class.php',
33
- 'Elementor\\Preview' => __DIR__ . '/../..' . '/plugin_files/tests/services/WidgetProviderTest.class.php',
34
  'LiveChat\\Drivers\\HttpClient' => __DIR__ . '/../..' . '/plugin_files/Drivers/HttpClient.class.php',
35
  'LiveChat\\Drivers\\HttpClientTest' => __DIR__ . '/../..' . '/plugin_files/tests/drivers/HttpClientTest.class.php',
36
  'LiveChat\\Drivers\\WP_Error' => __DIR__ . '/../..' . '/plugin_files/tests/drivers/HttpClientTest.class.php',
@@ -131,6 +129,8 @@ class ComposerStaticInitc9e00ab76f34e1502e32ce443cc37a87
131
  'LiveChat\\Services\\Templates\\ChatWidgetScriptTemplateTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/templates/ChatWidgetScriptTemplateTest.class.php',
132
  'LiveChat\\Services\\Templates\\ConfirmIdentityNoticeTemplate' => __DIR__ . '/../..' . '/plugin_files/Services/Templates/ConfirmIdentityNoticeTemplate.class.php',
133
  'LiveChat\\Services\\Templates\\ConnectNoticeTemplate' => __DIR__ . '/../..' . '/plugin_files/Services/Templates/ConnectNoticeTemplate.class.php',
 
 
134
  'LiveChat\\Services\\Templates\\CustomerTrackingTemplate' => __DIR__ . '/../..' . '/plugin_files/Services/Templates/CustomerTrackingTemplate.class.php',
135
  'LiveChat\\Services\\Templates\\CustomerTrackingTemplateTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/templates/CustomerTrackingTemplateTest.class.php',
136
  'LiveChat\\Services\\Templates\\DeactivationModalTemplate' => __DIR__ . '/../..' . '/plugin_files/Services/Templates/DeactivationModalTemplate.class.php',
@@ -158,9 +158,9 @@ class ComposerStaticInitc9e00ab76f34e1502e32ce443cc37a87
158
  public static function getInitializer(ClassLoader $loader)
159
  {
160
  return \Closure::bind(function () use ($loader) {
161
- $loader->prefixLengthsPsr4 = ComposerStaticInitc9e00ab76f34e1502e32ce443cc37a87::$prefixLengthsPsr4;
162
- $loader->prefixDirsPsr4 = ComposerStaticInitc9e00ab76f34e1502e32ce443cc37a87::$prefixDirsPsr4;
163
- $loader->classMap = ComposerStaticInitc9e00ab76f34e1502e32ce443cc37a87::$classMap;
164
 
165
  }, null, ClassLoader::class);
166
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitcceae03e413af29d224cad9e623d6194
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'L' =>
29
  );
30
 
31
  public static $classMap = array (
 
 
32
  'LiveChat\\Drivers\\HttpClient' => __DIR__ . '/../..' . '/plugin_files/Drivers/HttpClient.class.php',
33
  'LiveChat\\Drivers\\HttpClientTest' => __DIR__ . '/../..' . '/plugin_files/tests/drivers/HttpClientTest.class.php',
34
  'LiveChat\\Drivers\\WP_Error' => __DIR__ . '/../..' . '/plugin_files/tests/drivers/HttpClientTest.class.php',
129
  'LiveChat\\Services\\Templates\\ChatWidgetScriptTemplateTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/templates/ChatWidgetScriptTemplateTest.class.php',
130
  'LiveChat\\Services\\Templates\\ConfirmIdentityNoticeTemplate' => __DIR__ . '/../..' . '/plugin_files/Services/Templates/ConfirmIdentityNoticeTemplate.class.php',
131
  'LiveChat\\Services\\Templates\\ConnectNoticeTemplate' => __DIR__ . '/../..' . '/plugin_files/Services/Templates/ConnectNoticeTemplate.class.php',
132
+ 'LiveChat\\Services\\Templates\\ContactButtonWidgetTemplate' => __DIR__ . '/../..' . '/plugin_files/Services/Templates/ContactButtonWidgetTemplate.class.php',
133
+ 'LiveChat\\Services\\Templates\\ContactButtonWidgetTemplateTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/templates/ContactButtonWidgetTemplateTest.class.php',
134
  'LiveChat\\Services\\Templates\\CustomerTrackingTemplate' => __DIR__ . '/../..' . '/plugin_files/Services/Templates/CustomerTrackingTemplate.class.php',
135
  'LiveChat\\Services\\Templates\\CustomerTrackingTemplateTest' => __DIR__ . '/../..' . '/plugin_files/tests/services/templates/CustomerTrackingTemplateTest.class.php',
136
  'LiveChat\\Services\\Templates\\DeactivationModalTemplate' => __DIR__ . '/../..' . '/plugin_files/Services/Templates/DeactivationModalTemplate.class.php',
158
  public static function getInitializer(ClassLoader $loader)
159
  {
160
  return \Closure::bind(function () use ($loader) {
161
+ $loader->prefixLengthsPsr4 = ComposerStaticInitcceae03e413af29d224cad9e623d6194::$prefixLengthsPsr4;
162
+ $loader->prefixDirsPsr4 = ComposerStaticInitcceae03e413af29d224cad9e623d6194::$prefixDirsPsr4;
163
+ $loader->classMap = ComposerStaticInitcceae03e413af29d224cad9e623d6194::$classMap;
164
 
165
  }, null, ClassLoader::class);
166
  }