LiveChat – WP live chat plugin for WordPress - Version 4.5.2

Version Description

  • introduced prefixes to avoid naming collisions
Download this release

Release Info

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

Code changes from version 4.5.1 to 4.5.2

Files changed (29) hide show
  1. changelog.txt +3 -0
  2. composer.lock +5 -6
  3. config.php +14 -14
  4. livechat.php +3 -3
  5. plugin_files/LiveChatAdmin.class.php +3 -3
  6. plugin_files/Services/Elementor/Dependencies/Scripts/ScriptDependency.class.php +1 -1
  7. plugin_files/Services/MenuProvider.class.php +3 -3
  8. plugin_files/Services/ModuleConfiguration.class.php +1 -1
  9. plugin_files/Services/Notifications/Notification.class.php +1 -1
  10. plugin_files/Services/Options/Deprecated/DeprecatedOption.class.php +1 -1
  11. plugin_files/Services/Options/Option.class.php +1 -1
  12. plugin_files/Services/Options/ReadableOption.class.php +1 -1
  13. plugin_files/Services/Options/UserOption.class.php +1 -1
  14. plugin_files/Services/Options/WooCommerce/WooCommerceOption.class.php +1 -1
  15. plugin_files/Services/Options/WooCommerce/WooCommerceUserOption.class.php +1 -1
  16. plugin_files/Services/PlatformProvider.class.php +1 -1
  17. plugin_files/Services/SetupProvider.class.php +3 -3
  18. plugin_files/Services/Templates/ChatWidgetScriptTemplate.class.php +1 -1
  19. plugin_files/Services/Templates/ConfirmIdentityNoticeTemplate.class.php +1 -1
  20. plugin_files/Services/Templates/ConnectNoticeTemplate.class.php +1 -1
  21. plugin_files/Services/Templates/DeactivationModalTemplate.class.php +1 -1
  22. plugin_files/Services/Templates/NoticeTemplate.class.php +1 -1
  23. plugin_files/Services/Templates/ResourcesTabTemplate.class.php +1 -1
  24. plugin_files/Services/Templates/SettingsTemplate.class.php +2 -2
  25. plugin_files/Services/UrlProvider.class.php +2 -2
  26. readme.txt +4 -1
  27. vendor/autoload.php +1 -1
  28. vendor/composer/autoload_real.php +4 -4
  29. vendor/composer/autoload_static.php +4 -4
changelog.txt CHANGED
@@ -1,5 +1,8 @@
1
  == Changelog ==
2
 
 
 
 
3
  = 4.5.1 =
4
  * usage of Polyfill was removed
5
 
1
  == Changelog ==
2
 
3
+ = 4.5.2 =
4
+ * introduced prefixes to avoid naming collisions
5
+
6
  = 4.5.1 =
7
  * usage of Polyfill was removed
8
 
composer.lock CHANGED
@@ -63,16 +63,16 @@
63
  "packages-dev": [
64
  {
65
  "name": "antecedent/patchwork",
66
- "version": "2.1.15",
67
  "source": {
68
  "type": "git",
69
  "url": "https://github.com/antecedent/patchwork.git",
70
- "reference": "0430ceaac7f447f1778c199ec19d7e4362a6f961"
71
  },
72
  "dist": {
73
  "type": "zip",
74
- "url": "https://api.github.com/repos/antecedent/patchwork/zipball/0430ceaac7f447f1778c199ec19d7e4362a6f961",
75
- "reference": "0430ceaac7f447f1778c199ec19d7e4362a6f961",
76
  "shasum": ""
77
  },
78
  "require": {
@@ -103,7 +103,7 @@
103
  "runkit",
104
  "testing"
105
  ],
106
- "time": "2021-08-22T08:00:13+00:00"
107
  },
108
  {
109
  "name": "brain/monkey",
@@ -1683,7 +1683,6 @@
1683
  ],
1684
  "description": "Provides a list of PHP built-in functions that operate on resources",
1685
  "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
1686
- "abandoned": true,
1687
  "time": "2015-07-28T20:34:47+00:00"
1688
  },
1689
  {
63
  "packages-dev": [
64
  {
65
  "name": "antecedent/patchwork",
66
+ "version": "2.1.17",
67
  "source": {
68
  "type": "git",
69
  "url": "https://github.com/antecedent/patchwork.git",
70
+ "reference": "df5aba175a44c2996ced4edf8ec9f9081b5348c0"
71
  },
72
  "dist": {
73
  "type": "zip",
74
+ "url": "https://api.github.com/repos/antecedent/patchwork/zipball/df5aba175a44c2996ced4edf8ec9f9081b5348c0",
75
+ "reference": "df5aba175a44c2996ced4edf8ec9f9081b5348c0",
76
  "shasum": ""
77
  },
78
  "require": {
103
  "runkit",
104
  "testing"
105
  ],
106
+ "time": "2021-10-21T14:22:43+00:00"
107
  },
108
  {
109
  "name": "brain/monkey",
1683
  ],
1684
  "description": "Provides a list of PHP built-in functions that operate on resources",
1685
  "homepage": "https://www.github.com/sebastianbergmann/resource-operations",
 
1686
  "time": "2015-07-28T20:34:47+00:00"
1687
  },
1688
  {
config.php CHANGED
@@ -1,21 +1,21 @@
1
  <?php
2
 
3
- define( 'LC_PARTNER_ID', '' );
4
- define( 'LC_UTM_CAMPAIGN', '' );
5
- define( 'PLUGIN_SLUG', 'wp-live-chat-software-for-wordpress' );
6
- define( 'PLUGIN_MAIN_FILE', PLUGIN_SLUG . '/livechat.php' );
7
- define( 'OPTION_PREFIX', 'livechat_' );
8
- define( 'MENU_SLUG', 'livechat' );
9
- define( 'LC_RESOURCES_URL', 'https://www.livechat.com/wp-resources-integration/' );
10
- define( 'LC_APP_URL_PATTERN', 'https://connect.livechatinc.com/%s/%s%s' );
11
- define( 'LC_API_URL_PATTERN', 'https://%s.livechatinc.com' );
12
- define( 'LC_WIDGET_URL_REGEX', '/^https:\/\/connect(-eu)?\.livechatinc\.com\/api\/v1\/script\/([a-z]|[A-Z]|[0-9]|[-]){36}\/widget\.js(\?lcv=([a-z]|[A-Z]|[0-9]|[-]){36})?$/' );
13
- define( 'ELEMENTOR_WIDGET_URL_REGEX', '/^https:\/\/connect(-eu)?\.livechatinc\.com\/api\/v1\/script\/([a-z]|[A-Z]|[0-9]|[-]){36}\/%s\.js$/' );
14
- define( 'LC_AA_URL', 'https://my.livechatinc.com' );
15
- define( 'CONNECT_BRIDGE_SCRIPT_URL', 'https://cdn.livechat-static.com/integrations/integrations-connect/connect-bridge.js' );
16
 
17
  // Below has to be done this way because of PHP 5.6 limitations for using arrays in define.
18
- const DEPRECATED_OPTION_PREFIXES = array(
19
  'wp-legacy' => 'livechat_',
20
  'woo-legacy' => 'wc-lc_',
21
  'woo-2.x' => 'woo_livechat_',
1
  <?php
2
 
3
+ define( 'WPLC_PARTNER_ID', '' );
4
+ define( 'WPLC_UTM_CAMPAIGN', '' );
5
+ define( 'WPLC_PLUGIN_SLUG', 'wp-live-chat-software-for-wordpress' );
6
+ define( 'WPLC_PLUGIN_MAIN_FILE', WPLC_PLUGIN_SLUG . '/livechat.php' );
7
+ define( 'WPLC_OPTION_PREFIX', 'livechat_' );
8
+ define( 'WPLC_MENU_SLUG', 'livechat' );
9
+ define( 'WPLC_RESOURCES_URL', 'https://www.livechat.com/wp-resources-integration/' );
10
+ define( 'WPLC_APP_URL_PATTERN', 'https://connect.livechatinc.com/%s/%s%s' );
11
+ define( 'WPLC_API_URL_PATTERN', 'https://%s.livechatinc.com' );
12
+ define( 'WPLC_WIDGET_URL_REGEX', '/^https:\/\/connect(-eu)?\.livechatinc\.com\/api\/v1\/script\/([a-z]|[A-Z]|[0-9]|[-]){36}\/widget\.js(\?lcv=([a-z]|[A-Z]|[0-9]|[-]){36})?$/' );
13
+ define( 'WPLC_ELEMENTOR_WIDGET_URL_REGEX', '/^https:\/\/connect(-eu)?\.livechatinc\.com\/api\/v1\/script\/([a-z]|[A-Z]|[0-9]|[-]){36}\/%s\.js$/' );
14
+ define( 'WPLC_AA_URL', 'https://my.livechatinc.com' );
15
+ define( 'WPLC_CONNECT_BRIDGE_SCRIPT_URL', 'https://cdn.livechat-static.com/integrations/integrations-connect/connect-bridge.js' );
16
 
17
  // Below has to be done this way because of PHP 5.6 limitations for using arrays in define.
18
+ const WPLC_DEPRECATED_OPTION_PREFIXES = array(
19
  'wp-legacy' => 'livechat_',
20
  'woo-legacy' => 'wc-lc_',
21
  'woo-2.x' => 'woo_livechat_',
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.5.1
7
  * Author: LiveChat
8
  * Author URI: https://www.livechat.com
9
  * Text Domain: wp-live-chat-software-for-wordpress
@@ -65,7 +65,7 @@ if ( ! function_exists( 'livechat_get_detected_platform' ) ) {
65
  }
66
  }
67
 
68
- define( 'PLATFORM', livechat_get_detected_platform() );
69
 
70
  if ( ! function_exists( 'livechat_get_platform' ) ) {
71
  /**
@@ -75,7 +75,7 @@ if ( ! function_exists( 'livechat_get_platform' ) ) {
75
  */
76
  function livechat_get_platform() {
77
  // phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled
78
- return defined( 'PLATFORM' ) ? PLATFORM : 'wordpress';
79
  }
80
  }
81
 
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.5.2
7
  * Author: LiveChat
8
  * Author URI: https://www.livechat.com
9
  * Text Domain: wp-live-chat-software-for-wordpress
65
  }
66
  }
67
 
68
+ define( 'WPLC_PLATFORM', livechat_get_detected_platform() );
69
 
70
  if ( ! function_exists( 'livechat_get_platform' ) ) {
71
  /**
75
  */
76
  function livechat_get_platform() {
77
  // phpcs:ignore WordPress.WP.CapitalPDangit.Misspelled
78
+ return defined( 'WPLC_PLATFORM' ) ? WPLC_PLATFORM : 'wordpress';
79
  }
80
  }
81
 
plugin_files/LiveChatAdmin.class.php CHANGED
@@ -50,7 +50,7 @@ final class LiveChatAdmin extends LiveChat {
50
  * @return bool
51
  */
52
  public function auto_update( $update, $item ) {
53
- return PLUGIN_SLUG === $item->slug ? true : $update;
54
  }
55
 
56
  /**
@@ -87,11 +87,11 @@ final class LiveChatAdmin extends LiveChat {
87
  * @param string $plugin Plugin slug.
88
  */
89
  public function plugin_activated_action_handler( $plugin ) {
90
- if ( PLUGIN_MAIN_FILE !== $plugin ) {
91
  return;
92
  }
93
 
94
- wp_safe_redirect( admin_url( 'admin.php?page=' . MENU_SLUG . '_settings' ) );
95
  exit;
96
  }
97
 
50
  * @return bool
51
  */
52
  public function auto_update( $update, $item ) {
53
+ return WPLC_PLUGIN_SLUG === $item->slug ? true : $update;
54
  }
55
 
56
  /**
87
  * @param string $plugin Plugin slug.
88
  */
89
  public function plugin_activated_action_handler( $plugin ) {
90
+ if ( WPLC_PLUGIN_MAIN_FILE !== $plugin ) {
91
  return;
92
  }
93
 
94
+ wp_safe_redirect( admin_url( 'admin.php?page=' . WPLC_MENU_SLUG . '_settings' ) );
95
  exit;
96
  }
97
 
plugin_files/Services/Elementor/Dependencies/Scripts/ScriptDependency.class.php CHANGED
@@ -101,7 +101,7 @@ class ScriptDependency {
101
  */
102
  private function is_widget_url_valid( $widget_url ) {
103
  $pattern = sprintf(
104
- ELEMENTOR_WIDGET_URL_REGEX,
105
  $this->name
106
  );
107
 
101
  */
102
  private function is_widget_url_valid( $widget_url ) {
103
  $pattern = sprintf(
104
+ WPLC_ELEMENTOR_WIDGET_URL_REGEX,
105
  $this->name
106
  );
107
 
plugin_files/Services/MenuProvider.class.php CHANGED
@@ -272,9 +272,9 @@ class MenuProvider {
272
  SettingsProvider::get_instance(),
273
  ResourcesTabTemplate::create(),
274
  ModuleConfiguration::get_instance()->get_plugin_url(),
275
- MENU_SLUG,
276
- PLUGIN_MAIN_FILE,
277
- LC_AA_URL
278
  );
279
  }
280
 
272
  SettingsProvider::get_instance(),
273
  ResourcesTabTemplate::create(),
274
  ModuleConfiguration::get_instance()->get_plugin_url(),
275
+ WPLC_MENU_SLUG,
276
+ WPLC_PLUGIN_MAIN_FILE,
277
+ WPLC_AA_URL
278
  );
279
  }
280
 
plugin_files/Services/ModuleConfiguration.class.php CHANGED
@@ -116,7 +116,7 @@ class ModuleConfiguration {
116
  */
117
  public function get_plugin_version() {
118
  if ( is_null( $this->plugin_version ) ) {
119
- list(, $file) = explode( '/', PLUGIN_MAIN_FILE );
120
  $this->plugin_version = get_file_data( __DIR__ . '/../../' . $file, array( 'Version' ) )[0];
121
  }
122
 
116
  */
117
  public function get_plugin_version() {
118
  if ( is_null( $this->plugin_version ) ) {
119
+ list(, $file) = explode( '/', WPLC_PLUGIN_MAIN_FILE );
120
  $this->plugin_version = get_file_data( __DIR__ . '/../../' . $file, array( 'Version' ) )[0];
121
  }
122
 
plugin_files/Services/Notifications/Notification.class.php CHANGED
@@ -163,6 +163,6 @@ class Notification {
163
  * @return static
164
  */
165
  public static function get_instance() {
166
- return new static( Store::get_instance(), DeprecatedOptions::get_instance(), MENU_SLUG );
167
  }
168
  }
163
  * @return static
164
  */
165
  public static function get_instance() {
166
+ return new static( Store::get_instance(), DeprecatedOptions::get_instance(), WPLC_MENU_SLUG );
167
  }
168
  }
plugin_files/Services/Options/Deprecated/DeprecatedOption.class.php CHANGED
@@ -29,7 +29,7 @@ class DeprecatedOption extends ReadableOption {
29
  parent::__construct(
30
  livechat_is_woo() ? $woo_key : $wp_key,
31
  null,
32
- DEPRECATED_OPTION_PREFIXES[ livechat_is_woo() ? 'woo-legacy' : 'wp-legacy' ]
33
  );
34
  }
35
  }
29
  parent::__construct(
30
  livechat_is_woo() ? $woo_key : $wp_key,
31
  null,
32
+ WPLC_DEPRECATED_OPTION_PREFIXES[ livechat_is_woo() ? 'woo-legacy' : 'wp-legacy' ]
33
  );
34
  }
35
  }
plugin_files/Services/Options/Option.class.php CHANGED
@@ -42,7 +42,7 @@ class Option {
42
  *
43
  * @throws Exception Can be thrown when $key is not provided.
44
  */
45
- public function __construct( $name, $fallback = null, $prefix = OPTION_PREFIX ) {
46
  if ( empty( $name ) ) {
47
  throw new Exception( 'Option cannot be declared without a storage key.' );
48
  }
42
  *
43
  * @throws Exception Can be thrown when $key is not provided.
44
  */
45
+ public function __construct( $name, $fallback = null, $prefix = WPLC_OPTION_PREFIX ) {
46
  if ( empty( $name ) ) {
47
  throw new Exception( 'Option cannot be declared without a storage key.' );
48
  }
plugin_files/Services/Options/ReadableOption.class.php CHANGED
@@ -23,7 +23,7 @@ class ReadableOption extends Option {
23
  */
24
  public function get_option_fallback( $id = null ) {
25
  // To prevent fallbacks for WooCommerceOption instances.
26
- if ( OPTION_PREFIX !== $this->prefix ) {
27
  return $this->fallback;
28
  }
29
 
23
  */
24
  public function get_option_fallback( $id = null ) {
25
  // To prevent fallbacks for WooCommerceOption instances.
26
+ if ( WPLC_OPTION_PREFIX !== $this->prefix ) {
27
  return $this->fallback;
28
  }
29
 
plugin_files/Services/Options/UserOption.class.php CHANGED
@@ -23,7 +23,7 @@ class UserOption extends Option {
23
  */
24
  public function get_option_fallback( $id ) {
25
  // To prevent fallbacks for WooCommerceUserOption instances.
26
- if ( OPTION_PREFIX !== $this->prefix ) {
27
  return $this->fallback;
28
  }
29
 
23
  */
24
  public function get_option_fallback( $id ) {
25
  // To prevent fallbacks for WooCommerceUserOption instances.
26
+ if ( WPLC_OPTION_PREFIX !== $this->prefix ) {
27
  return $this->fallback;
28
  }
29
 
plugin_files/Services/Options/WooCommerce/WooCommerceOption.class.php CHANGED
@@ -25,7 +25,7 @@ class WooCommerceOption extends ReadableOption {
25
  parent::__construct(
26
  $key,
27
  $fallback,
28
- DEPRECATED_OPTION_PREFIXES['woo-2.x']
29
  );
30
  }
31
  }
25
  parent::__construct(
26
  $key,
27
  $fallback,
28
+ WPLC_DEPRECATED_OPTION_PREFIXES['woo-2.x']
29
  );
30
  }
31
  }
plugin_files/Services/Options/WooCommerce/WooCommerceUserOption.class.php CHANGED
@@ -25,7 +25,7 @@ class WooCommerceUserOption extends UserOption {
25
  parent::__construct(
26
  $key,
27
  $fallback,
28
- DEPRECATED_OPTION_PREFIXES['woo-2.x']
29
  );
30
  }
31
  }
25
  parent::__construct(
26
  $key,
27
  $fallback,
28
+ WPLC_DEPRECATED_OPTION_PREFIXES['woo-2.x']
29
  );
30
  }
31
  }
plugin_files/Services/PlatformProvider.class.php CHANGED
@@ -111,7 +111,7 @@ class PlatformProvider {
111
  * @return string
112
  */
113
  private function get_platform_from_slug() {
114
- switch ( PLUGIN_SLUG ) {
115
  case 'livechat-woocommerce':
116
  return self::$woocommerce_platform;
117
  case 'livechat-elementor':
111
  * @return string
112
  */
113
  private function get_platform_from_slug() {
114
+ switch ( WPLC_PLUGIN_SLUG ) {
115
  case 'livechat-woocommerce':
116
  return self::$woocommerce_platform;
117
  case 'livechat-elementor':
plugin_files/Services/SetupProvider.class.php CHANGED
@@ -92,7 +92,7 @@ class SetupProvider {
92
  $this->load_design_system_styles();
93
  wp_enqueue_script( 'livechat', $this->plugin_url . 'js/livechat.js', 'jquery', $this->plugin_version, true );
94
  wp_enqueue_style( 'livechat', $this->plugin_url . 'css/livechat-general.css', false, $this->plugin_version );
95
- wp_enqueue_script( 'bridge', CONNECT_BRIDGE_SCRIPT_URL . '?lcv=' . $this->plugin_slug . '-' . $this->plugin_version, 'jquery', $this->plugin_version, false );
96
 
97
  $config = array(
98
  'slug' => $this->plugin_slug,
@@ -146,8 +146,8 @@ class SetupProvider {
146
  static::$instance = new static(
147
  $module->get_plugin_url(),
148
  $module->get_plugin_version(),
149
- PLUGIN_SLUG,
150
- LC_AA_URL
151
  );
152
  }
153
 
92
  $this->load_design_system_styles();
93
  wp_enqueue_script( 'livechat', $this->plugin_url . 'js/livechat.js', 'jquery', $this->plugin_version, true );
94
  wp_enqueue_style( 'livechat', $this->plugin_url . 'css/livechat-general.css', false, $this->plugin_version );
95
+ wp_enqueue_script( 'bridge', WPLC_CONNECT_BRIDGE_SCRIPT_URL . '?lcv=' . $this->plugin_slug . '-' . $this->plugin_version, 'jquery', $this->plugin_version, false );
96
 
97
  $config = array(
98
  'slug' => $this->plugin_slug,
146
  static::$instance = new static(
147
  $module->get_plugin_url(),
148
  $module->get_plugin_version(),
149
+ WPLC_PLUGIN_SLUG,
150
+ WPLC_AA_URL
151
  );
152
  }
153
 
plugin_files/Services/Templates/ChatWidgetScriptTemplate.class.php CHANGED
@@ -95,7 +95,7 @@ class ChatWidgetScriptTemplate extends Template {
95
  * @return false|int
96
  */
97
  private function is_widget_url_valid( $widget_url ) {
98
- return preg_match( LC_WIDGET_URL_REGEX, $widget_url );
99
  }
100
 
101
  /**
95
  * @return false|int
96
  */
97
  private function is_widget_url_valid( $widget_url ) {
98
+ return preg_match( WPLC_WIDGET_URL_REGEX, $widget_url );
99
  }
100
 
101
  /**
plugin_files/Services/Templates/ConfirmIdentityNoticeTemplate.class.php CHANGED
@@ -16,7 +16,7 @@ class ConfirmIdentityNoticeTemplate extends Template {
16
  */
17
  public function render() {
18
  $context = array();
19
- $context['lcNoticeLogoUrl'] = esc_html( plugins_url( PLUGIN_SLUG ) . '/plugin_files/images/livechat-logo.svg' );
20
  $context['header'] = esc_html__( 'Action required - confirm your identity', 'wp-live-chat-software-for-wordpress' );
21
  $context['notice'] = esc_html__(
22
  'Thank you for updating LiveChat to the latest version. Please click Connect to confirm your identity and finish the installation.',
16
  */
17
  public function render() {
18
  $context = array();
19
+ $context['lcNoticeLogoUrl'] = esc_html( plugins_url( WPLC_PLUGIN_SLUG ) . '/plugin_files/images/livechat-logo.svg' );
20
  $context['header'] = esc_html__( 'Action required - confirm your identity', 'wp-live-chat-software-for-wordpress' );
21
  $context['notice'] = esc_html__(
22
  'Thank you for updating LiveChat to the latest version. Please click Connect to confirm your identity and finish the installation.',
plugin_files/Services/Templates/ConnectNoticeTemplate.class.php CHANGED
@@ -21,7 +21,7 @@ class ConnectNoticeTemplate extends Template {
21
  $context['lcNoticeLogoUrl'] = esc_html(
22
  sprintf(
23
  '%s/plugin_files/images/livechat-logo.svg',
24
- plugins_url( PLUGIN_SLUG )
25
  )
26
  );
27
  $context['noticeHeader'] = esc_html__( 'Action required - connect LiveChat', 'wp-live-chat-software-for-wordpress' );
21
  $context['lcNoticeLogoUrl'] = esc_html(
22
  sprintf(
23
  '%s/plugin_files/images/livechat-logo.svg',
24
+ plugins_url( WPLC_PLUGIN_SLUG )
25
  )
26
  );
27
  $context['noticeHeader'] = esc_html__( 'Action required - connect LiveChat', 'wp-live-chat-software-for-wordpress' );
plugin_files/Services/Templates/DeactivationModalTemplate.class.php CHANGED
@@ -26,7 +26,7 @@ class DeactivationModalTemplate extends Template {
26
  $context['lcNoticeLogo'] = esc_html(
27
  sprintf(
28
  '%s/plugin_files/images/livechat-icon.svg',
29
- plugins_url( PLUGIN_SLUG )
30
  )
31
  );
32
  $context['header'] = esc_html__( 'Quick Feedback', 'wp-live-chat-software-for-wordpress' );
26
  $context['lcNoticeLogo'] = esc_html(
27
  sprintf(
28
  '%s/plugin_files/images/livechat-icon.svg',
29
+ plugins_url( WPLC_PLUGIN_SLUG )
30
  )
31
  );
32
  $context['header'] = esc_html__( 'Quick Feedback', 'wp-live-chat-software-for-wordpress' );
plugin_files/Services/Templates/NoticeTemplate.class.php CHANGED
@@ -120,7 +120,7 @@ class NoticeTemplate extends Template {
120
  Store::get_instance(),
121
  UrlProvider::create_from_token(),
122
  ReviewNoticeOptions::get_instance(),
123
- PLATFORM,
124
  TemplateParser::create( '../templates' ),
125
  $context
126
  );
120
  Store::get_instance(),
121
  UrlProvider::create_from_token(),
122
  ReviewNoticeOptions::get_instance(),
123
+ WPLC_PLATFORM,
124
  TemplateParser::create( '../templates' ),
125
  $context
126
  );
plugin_files/Services/Templates/ResourcesTabTemplate.class.php CHANGED
@@ -16,7 +16,7 @@ class ResourcesTabTemplate extends Template {
16
  */
17
  public function render() {
18
  $context = array();
19
- $context['resourcesUrl'] = esc_html( LC_RESOURCES_URL );
20
  $this->template_parser->parse_template( 'resources.html.twig', $context );
21
  }
22
  }
16
  */
17
  public function render() {
18
  $context = array();
19
+ $context['resourcesUrl'] = esc_html( WPLC_RESOURCES_URL );
20
  $this->template_parser->parse_template( 'resources.html.twig', $context );
21
  }
22
  }
plugin_files/Services/Templates/SettingsTemplate.class.php CHANGED
@@ -141,8 +141,8 @@ class SettingsTemplate extends Template {
141
  $context['moduleVer'] = esc_html( $this->module->get_plugin_version() );
142
  $context['lcToken'] = esc_html( $this->user->get_current_user_token() );
143
  $context['storeToken'] = esc_html( $this->store->get_store_token() );
144
- $context['partnerId'] = esc_html( LC_PARTNER_ID );
145
- $context['utmCampaign'] = esc_html( LC_UTM_CAMPAIGN );
146
  $context['license'] = esc_html( $this->license_provider->get_license_number() );
147
  $context['legacyOptions'] = wp_json_encode( $this->get_legacy_options() );
148
  $context['platform'] = esc_js( livechat_get_platform() );
141
  $context['moduleVer'] = esc_html( $this->module->get_plugin_version() );
142
  $context['lcToken'] = esc_html( $this->user->get_current_user_token() );
143
  $context['storeToken'] = esc_html( $this->store->get_store_token() );
144
+ $context['partnerId'] = esc_html( WPLC_PARTNER_ID );
145
+ $context['utmCampaign'] = esc_html( WPLC_UTM_CAMPAIGN );
146
  $context['license'] = esc_html( $this->license_provider->get_license_number() );
147
  $context['legacyOptions'] = wp_json_encode( $this->get_legacy_options() );
148
  $context['platform'] = esc_js( livechat_get_platform() );
plugin_files/Services/UrlProvider.class.php CHANGED
@@ -108,8 +108,8 @@ class UrlProvider {
108
  */
109
  public static function create(
110
  $connect_token = null,
111
- $api_url_format = LC_API_URL_PATTERN,
112
- $app_url_format = LC_APP_URL_PATTERN
113
  ) {
114
  return new static(
115
  $connect_token,
108
  */
109
  public static function create(
110
  $connect_token = null,
111
+ $api_url_format = WPLC_API_URL_PATTERN,
112
+ $app_url_format = WPLC_APP_URL_PATTERN
113
  ) {
114
  return new static(
115
  $connect_token,
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.5.1
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.5.1 =
356
  * usage of Polyfill was removed
357
 
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.5.2
5
  Requires PHP: 5.6
6
  Tested up to: 5.8
7
  Requires at least: 4.4
352
 
353
  == Changelog ==
354
 
355
+ = 4.5.2 =
356
+ * introduced prefixes to avoid naming collisions
357
+
358
  = 4.5.1 =
359
  * usage of Polyfill was removed
360
 
vendor/autoload.php CHANGED
@@ -4,4 +4,4 @@
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
- return ComposerAutoloaderInit1594f150f6f38dd5d49b5590a6ccfa73::getLoader();
4
 
5
  require_once __DIR__ . '/composer/autoload_real.php';
6
 
7
+ return ComposerAutoloaderInitbe8016d7541d0796303ef7274159d1cd::getLoader();
vendor/composer/autoload_real.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  // autoload_real.php @generated by Composer
4
 
5
- class ComposerAutoloaderInit1594f150f6f38dd5d49b5590a6ccfa73
6
  {
7
  private static $loader;
8
 
@@ -22,15 +22,15 @@ class ComposerAutoloaderInit1594f150f6f38dd5d49b5590a6ccfa73
22
  return self::$loader;
23
  }
24
 
25
- spl_autoload_register(array('ComposerAutoloaderInit1594f150f6f38dd5d49b5590a6ccfa73', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
- spl_autoload_unregister(array('ComposerAutoloaderInit1594f150f6f38dd5d49b5590a6ccfa73', '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\ComposerStaticInit1594f150f6f38dd5d49b5590a6ccfa73::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 ComposerAutoloaderInitbe8016d7541d0796303ef7274159d1cd
6
  {
7
  private static $loader;
8
 
22
  return self::$loader;
23
  }
24
 
25
+ spl_autoload_register(array('ComposerAutoloaderInitbe8016d7541d0796303ef7274159d1cd', 'loadClassLoader'), true, true);
26
  self::$loader = $loader = new \Composer\Autoload\ClassLoader();
27
+ spl_autoload_unregister(array('ComposerAutoloaderInitbe8016d7541d0796303ef7274159d1cd', '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\ComposerStaticInitbe8016d7541d0796303ef7274159d1cd::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 ComposerStaticInit1594f150f6f38dd5d49b5590a6ccfa73
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'L' =>
@@ -130,9 +130,9 @@ class ComposerStaticInit1594f150f6f38dd5d49b5590a6ccfa73
130
  public static function getInitializer(ClassLoader $loader)
131
  {
132
  return \Closure::bind(function () use ($loader) {
133
- $loader->prefixLengthsPsr4 = ComposerStaticInit1594f150f6f38dd5d49b5590a6ccfa73::$prefixLengthsPsr4;
134
- $loader->prefixDirsPsr4 = ComposerStaticInit1594f150f6f38dd5d49b5590a6ccfa73::$prefixDirsPsr4;
135
- $loader->classMap = ComposerStaticInit1594f150f6f38dd5d49b5590a6ccfa73::$classMap;
136
 
137
  }, null, ClassLoader::class);
138
  }
4
 
5
  namespace Composer\Autoload;
6
 
7
+ class ComposerStaticInitbe8016d7541d0796303ef7274159d1cd
8
  {
9
  public static $prefixLengthsPsr4 = array (
10
  'L' =>
130
  public static function getInitializer(ClassLoader $loader)
131
  {
132
  return \Closure::bind(function () use ($loader) {
133
+ $loader->prefixLengthsPsr4 = ComposerStaticInitbe8016d7541d0796303ef7274159d1cd::$prefixLengthsPsr4;
134
+ $loader->prefixDirsPsr4 = ComposerStaticInitbe8016d7541d0796303ef7274159d1cd::$prefixDirsPsr4;
135
+ $loader->classMap = ComposerStaticInitbe8016d7541d0796303ef7274159d1cd::$classMap;
136
 
137
  }, null, ClassLoader::class);
138
  }