WhatsApp me - Version 2.2.3

Version Description

  • NEW: Hide in front if editing with Elementor.
  • CHANGED improvements in public styles.
Download this release

Release Info

Developer creapuntome
Plugin Icon 128x128 WhatsApp me
Version 2.2.3
Comparing to
See all releases

Code changes from version 2.2.2 to 2.2.3

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: whatsapp, button, chat, support, contact, click to chat, directly message
5
  Requires at least: 3.0.1
6
  Tested up to: 5.1
7
  Requires PHP: 5.3
8
- Stable tag: 2.2.2
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -45,10 +45,20 @@ More info, news and tricks in [wame.chat](https://wame.chat)
45
 
46
  == Frequently Asked Questions ==
47
 
 
 
 
 
 
 
 
 
48
  = I can't see the button or it's over / under another thing =
49
 
50
  You can change the position of the button so that nothing covers it by adding this CSS in *Appearance > Customize > Custom CSS*:
 
51
  `.whatsappme { z-index:9999; }`
 
52
  Greater values of z-index are left over, the default value is 400.
53
 
54
  = What about GDPR? =
@@ -60,14 +70,17 @@ WhatsApp me don't save any personal data and don't use cookies.
60
  WhatsApp me send an event when user click to launch WhatsApp.
61
 
62
  If Global Site Tag (gtag.js) detected:
 
63
  `gtag('event', 'click', { 'event_category': 'WhatsAppMe', 'event_label': out_url })`
64
 
65
  If Universal Analtics (analytics.js) detected:
 
66
  `ga('send', 'event', 'WhatsAppMe', 'click', out_url })`
67
 
68
  = Google Tag Manager integration =
69
 
70
  WhatsApp me send an event (if GTM detected) when user click to launch WhatsApp:
 
71
  `dataLayer.push({ 'event': 'WhatsAppMe', 'eventAction': 'click', 'eventLabel': out_url });`
72
 
73
  == Screenshots ==
@@ -81,6 +94,10 @@ WhatsApp me send an event (if GTM detected) when user click to launch WhatsApp:
81
 
82
  == Changelog ==
83
 
 
 
 
 
84
  = 2.2.2 =
85
  * **NEW:** styles/scripts minified.
86
  * FIX UX issues.
5
  Requires at least: 3.0.1
6
  Tested up to: 5.1
7
  Requires PHP: 5.3
8
+ Stable tag: 2.2.3
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
45
 
46
  == Frequently Asked Questions ==
47
 
48
+ = Open WhatsApp Web on desktop =
49
+
50
+ By default, WhatsApp me always opens api.whatsapp.com and try to launch the native application or if it doesn't exist redirects to WhatsApp Web. Depending on the browser and the operating system, sometimes it doesn't work.
51
+
52
+ If you prefer always open WhatsApp Web on desktop you can add this code in your functions.php:
53
+
54
+ `add_filter( 'whatsappme_whastapp_web', '__return_true' );`
55
+
56
  = I can't see the button or it's over / under another thing =
57
 
58
  You can change the position of the button so that nothing covers it by adding this CSS in *Appearance > Customize > Custom CSS*:
59
+
60
  `.whatsappme { z-index:9999; }`
61
+
62
  Greater values of z-index are left over, the default value is 400.
63
 
64
  = What about GDPR? =
70
  WhatsApp me send an event when user click to launch WhatsApp.
71
 
72
  If Global Site Tag (gtag.js) detected:
73
+
74
  `gtag('event', 'click', { 'event_category': 'WhatsAppMe', 'event_label': out_url })`
75
 
76
  If Universal Analtics (analytics.js) detected:
77
+
78
  `ga('send', 'event', 'WhatsAppMe', 'click', out_url })`
79
 
80
  = Google Tag Manager integration =
81
 
82
  WhatsApp me send an event (if GTM detected) when user click to launch WhatsApp:
83
+
84
  `dataLayer.push({ 'event': 'WhatsAppMe', 'eventAction': 'click', 'eventLabel': out_url });`
85
 
86
  == Screenshots ==
94
 
95
  == Changelog ==
96
 
97
+ = 2.2.3 =
98
+ * **NEW:** Hide in front if editing with Elementor.
99
+ * CHANGED improvements in public styles.
100
+
101
  = 2.2.2 =
102
  * **NEW:** styles/scripts minified.
103
  * FIX UX issues.
includes/class-whatsappme.php CHANGED
@@ -144,10 +144,11 @@ class WhatsAppMe {
144
 
145
  $plugin_public = new WhatsAppMe_Public( $this->get_plugin_name(), $this->get_version() );
146
 
147
- $this->loader->add_action( 'wp', $plugin_public, 'get_settings' );
148
- $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
149
- $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
150
- $this->loader->add_action( 'wp_footer', $plugin_public, 'footer_html' );
 
151
 
152
  }
153
 
144
 
145
  $plugin_public = new WhatsAppMe_Public( $this->get_plugin_name(), $this->get_version() );
146
 
147
+ $this->loader->add_action( 'wp', $plugin_public, 'get_settings' );
148
+ $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_styles' );
149
+ $this->loader->add_action( 'wp_enqueue_scripts', $plugin_public, 'enqueue_scripts' );
150
+ $this->loader->add_action( 'wp_footer', $plugin_public, 'footer_html' );
151
+ $this->loader->add_action( 'elementor/preview/init', $plugin_public, 'elementor_preview_disable' );
152
 
153
  }
154
 
public/class-whatsappme-public.php CHANGED
@@ -180,19 +180,19 @@ class WhatsAppMe_Public {
180
  <div class="whatsappme whatsappme--<?php echo $this->settings['position']; ?>" data-settings="<?php echo esc_attr( json_encode( $data ) ); ?>">
181
  <div class="whatsappme__button">
182
  <svg width="24" height="24" viewBox="0 0 24 24">
183
- <path id="wa_ico" fill="currentColor" d="M.057 24l1.687-6.163a11.867 11.867 0 0 1-1.587-5.946C.16 5.335 5.495 0 12.05 0a11.817 11.817 0 0 1 8.413 3.488 11.824 11.824 0 0 1 3.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 0 1-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z"/>
184
- <path id="send_ico" fill="currentColor" d="M1.101 21.757L23.8 12.028 1.101 2.3l.011 7.912 13.623 1.816-13.623 1.817-.011 7.912z"/>
185
  </svg>
186
  <?php if ($this->settings['message_badge']): ?><div class="whatsappme__badge">1</div><?php endif; ?>
187
  </div>
188
  <?php if ($this->settings['message_text']): ?>
189
  <div class="whatsappme__box">
190
  <header class="whatsappme__header">
191
- <svg width="120" height="28" viewBox="0 0 120 28"><path fill="currentColor" fill-rule="evenodd" d="M117.2 17c0 .4-.2.7-.4 1-.1.3-.4.5-.7.7l-1 .2c-.5 0-.9 0-1.2-.2l-.7-.7a3 3 0 0 1-.4-1 5.4 5.4 0 0 1 0-2.3c0-.4.2-.7.4-1l.7-.7a2 2 0 0 1 1.1-.3 2 2 0 0 1 1.8 1l.4 1a5.3 5.3 0 0 1 0 2.3zm2.5-3c-.1-.7-.4-1.3-.8-1.7a4 4 0 0 0-1.3-1.2c-.6-.3-1.3-.4-2-.4-.6 0-1.2.1-1.7.4a3 3 0 0 0-1.2 1.1V11H110v13h2.7v-4.5c.4.4.8.8 1.3 1 .5.3 1 .4 1.6.4a4 4 0 0 0 3.2-1.5c.4-.5.7-1 .8-1.6.2-.6.3-1.2.3-1.9s0-1.3-.3-2zm-13.1 3c0 .4-.2.7-.4 1l-.7.7-1.1.2c-.4 0-.8 0-1-.2-.4-.2-.6-.4-.8-.7a3 3 0 0 1-.4-1 5.4 5.4 0 0 1 0-2.3c0-.4.2-.7.4-1 .1-.3.4-.5.7-.7a2 2 0 0 1 1-.3 2 2 0 0 1 1.9 1l.4 1a5.4 5.4 0 0 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.1 5.7 11.5 11.5 0 0 1 14 25.3zM14 0A13.8 13.8 0 0 0 2 20.7L0 28l7.3-2A13.8 13.8 0 1 0 14 0z"/></svg>
192
- <div class="whatsappme__close"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M24 2.4L21.6 0 12 9.6 2.4 0 0 2.4 9.6 12 0 21.6 2.4 24l9.6-9.6 9.6 9.6 2.4-2.4-9.6-9.6L24 2.4z"/></svg></div>
193
  </header>
194
  <div class="whatsappme__message"><?php echo $this->formated_message(); ?></div>
195
- <?php if ($copy): ?><div class="whatsappme__copy"><?php echo $copy; ?> <a href="https://wame.chat" rel="noopener" target="_blank"><svg width="72" height="17" viewBox="0 0 72 17"><path fill="currentColor" fill-rule="evenodd" d="M25.371 10.429l2.122-6.239h.045l2.054 6.239h-4.22zm32.2 2.397c-.439.495-.88.953-1.325 1.375-.797.755-1.332 1.232-1.604 1.43-.622.438-1.156.706-1.604.805-.447.1-.787.13-1.02.09a3.561 3.561 0 0 1-.7-.239c-.66-.318-1.02-.864-1.079-1.64-.058-.774.03-1.619.263-2.533.35-1.987 1.108-4.133 2.274-6.438a73.481 73.481 0 0 0-2.8 3.04c-.816.954-1.7 2.096-2.653 3.428a44.068 44.068 0 0 0-2.77 4.441c-.738 0-1.341-.159-1.808-.477-.427-.278-.748-.695-.962-1.252-.214-.556-.165-1.41.146-2.563l.204-.626c.097-.298.204-.606.32-.924.117-.318.234-.626.35-.924.117-.298.195-.507.234-.626v.06c.272-.756.603-1.56.991-2.415a56.92 56.92 0 0 1 1.4-2.832 62.832 62.832 0 0 0-3.266 3.875 61.101 61.101 0 0 0-2.945 3.995 57.072 57.072 0 0 0-2.886 4.71c-.387 0-.736-.044-1.048-.131l.195.545h-3.72l-1.23-3.786h-6.093L23.158 17h-3.605l6.16-17h3.674l4.357 12.16c.389-1.35.97-2.736 1.74-4.16a41.336 41.336 0 0 0 2.013-4.232.465.465 0 0 0 .058-.18c0-.039.02-.098.058-.178.04-.08.078-.199.117-.358.039-.159.097-.337.175-.536.039-.12.078-.219.117-.298a.465.465 0 0 0 .058-.18c.078-.277.175-.575.292-.893.116-.318.194-.597.233-.835V.25c-.039-.04-.039-.08 0-.119l.233-.12c.117-.039.292.02.525.18.156.08.292.179.408.298.272.199.564.427.875.685.311.259.583.557.816.895a2.9 2.9 0 0 1 .467 1.043c.078.358.039.735-.117 1.133a8.127 8.127 0 0 1-.35.775c0 .08-.038.159-.116.238a2.93 2.93 0 0 1-.175.298 7.05 7.05 0 0 0-.35.656c-.039.04-.058.07-.058.09 0 .02-.02.05-.059.089a61.988 61.988 0 0 1-1.633 2.385c-.544.755-.913 1.35-1.108 1.788a79.39 79.39 0 0 1 3.5-4.233 101.59 101.59 0 0 1 3.12-3.398C45.651 1.82 46.612.986 47.468.43c.739.278 1.341.596 1.808.954.428.318.768.676 1.02 1.073.253.398.244.835-.029 1.312l-1.4 2.325a36.928 36.928 0 0 0-1.749 3.279 53.748 53.748 0 0 1 1.633-1.848 46.815 46.815 0 0 1 4.024-3.875c.7-.597 1.38-1.113 2.041-1.55.739.278 1.341.596 1.808.953.428.318.768.676 1.02 1.073.253.398.243.835-.029 1.312-.155.318-.408.795-.758 1.43a152.853 152.853 0 0 0-2.04 3.846 97.87 97.87 0 0 0-.467.924c-.35.835-.632 1.55-.846 2.146-.214.597-.282.934-.204 1.014a.63.63 0 0 0 .291-.06c.234-.119.564-.348.992-.685.428-.338.875-.736 1.341-1.193.467-.457.914-.914 1.341-1.37.217-.232.409-.45.575-.657a15.4 15.4 0 0 1 .957-2.514c.34-.696.708-1.333 1.108-1.91.399-.576.778-1.044 1.137-1.402a19.553 19.553 0 0 1 1.796-1.7 32.727 32.727 0 0 1 1.497-1.164 8.821 8.821 0 0 1 1.317-.835C66.292.989 66.83.83 67.269.83c.32 0 .649.11.988.328.34.22.649.478.928.776.28.299.519.607.718.925.2.318.3.557.3.716.04.597-.06 1.253-.3 1.97a7.14 7.14 0 0 1-1.107 2.058 8.534 8.534 0 0 1-1.826 1.76 6.522 6.522 0 0 1-2.395 1.074c-.2.08-.36.06-.48-.06a.644.644 0 0 1-.179-.477c0-.358.14-.616.42-.776.837-.318 1.536-.735 2.095-1.253.559-.517.998-1.034 1.317-1.551.4-.597.699-1.213.898-1.85 0-.199-.09-.308-.27-.328a4.173 4.173 0 0 0-.448-.03 4.83 4.83 0 0 0-1.318.597c-.399.239-.848.577-1.347 1.014-.499.438-1.028 1.015-1.586 1.73-.918 1.154-1.587 2.298-2.006 3.432-.42 1.134-.629 1.979-.629 2.536 0 .915.19 1.482.569 1.7.38.22.728.329 1.048.329.638 0 1.347-.15 2.125-.448a16.248 16.248 0 0 0 2.305-1.104 30.05 30.05 0 0 0 2.126-1.342 27.256 27.256 0 0 0 1.646-1.224c.08-.04.18-.1.3-.179l.24-.12a.54.54 0 0 1 .239-.059c.08 0 .16.02.24.06.08.04.119.16.119.358 0 .239-.08.457-.24.656a19.115 19.115 0 0 1-2.245 1.82 35.445 35.445 0 0 1-2.185 1.403c-.759.437-1.497.855-2.215 1.253a8.461 8.461 0 0 1-1.647.387c-.499.06-.968.09-1.407.09-.998 0-1.796-.16-2.395-.477-.599-.319-1.048-.706-1.347-1.164a4.113 4.113 0 0 1-.599-1.372c-.1-.457-.15-.843-.15-1.161zm-42.354-1.111L17.887 0h3.514L17.02 17h-3.56L10.7 5.428h-.046L7.94 17H4.312L0 0h3.582L6.16 11.571h.045L9.035 0h3.354l2.783 11.715h.045z"/></svg></a></div><?php endif; ?>
196
  </div>
197
  <?php endif; ?>
198
  </div>
@@ -381,4 +381,17 @@ class WhatsAppMe_Public {
381
 
382
  return $global;
383
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
384
  }
180
  <div class="whatsappme whatsappme--<?php echo $this->settings['position']; ?>" data-settings="<?php echo esc_attr( json_encode( $data ) ); ?>">
181
  <div class="whatsappme__button">
182
  <svg width="24" height="24" viewBox="0 0 24 24">
183
+ <path id="wa_ico" fill="#fff" d="M.057 24l1.687-6.163a11.867 11.867 0 0 1-1.587-5.946C.16 5.335 5.495 0 12.05 0a11.817 11.817 0 0 1 8.413 3.488 11.824 11.824 0 0 1 3.48 8.414c-.003 6.557-5.338 11.892-11.893 11.892a11.9 11.9 0 0 1-5.688-1.448L.057 24zm6.597-3.807c1.676.995 3.276 1.591 5.392 1.592 5.448 0 9.886-4.434 9.889-9.885.002-5.462-4.415-9.89-9.881-9.892-5.452 0-9.887 4.434-9.889 9.884-.001 2.225.651 3.891 1.746 5.634l-.999 3.648 3.742-.981zm11.387-5.464c-.074-.124-.272-.198-.57-.347-.297-.149-1.758-.868-2.031-.967-.272-.099-.47-.149-.669.149-.198.297-.768.967-.941 1.165-.173.198-.347.223-.644.074-.297-.149-1.255-.462-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.297-.347.446-.521.151-.172.2-.296.3-.495.099-.198.05-.372-.025-.521-.075-.148-.669-1.611-.916-2.206-.242-.579-.487-.501-.669-.51l-.57-.01c-.198 0-.52.074-.792.372s-1.04 1.016-1.04 2.479 1.065 2.876 1.213 3.074c.149.198 2.095 3.2 5.076 4.487.709.306 1.263.489 1.694.626.712.226 1.36.194 1.872.118.571-.085 1.758-.719 2.006-1.413.248-.695.248-1.29.173-1.414z"/>
184
+ <path id="send_ico" fill="#fff" d="M1.101 21.757L23.8 12.028 1.101 2.3l.011 7.912 13.623 1.816-13.623 1.817-.011 7.912z"/>
185
  </svg>
186
  <?php if ($this->settings['message_badge']): ?><div class="whatsappme__badge">1</div><?php endif; ?>
187
  </div>
188
  <?php if ($this->settings['message_text']): ?>
189
  <div class="whatsappme__box">
190
  <header class="whatsappme__header">
191
+ <svg width="120" height="28" viewBox="0 0 120 28"><path fill="#fff" fill-rule="evenodd" d="M117.2 17c0 .4-.2.7-.4 1-.1.3-.4.5-.7.7l-1 .2c-.5 0-.9 0-1.2-.2l-.7-.7a3 3 0 0 1-.4-1 5.4 5.4 0 0 1 0-2.3c0-.4.2-.7.4-1l.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.3zm-14 4.7l-2.3-9.2h-2.8l-2.3 9-2.2-9h-3l3.6 13.4h3l2.2-9.2 2.3 9.2h3l3.6-13.4h-3l-2.1 9.2zm-24.5.2L18 15.6c-.3-.1-.6-.2-.8.2A20 20 0 0 1 16 17c-.2.2-.4.3-.7.1-.4-.2-1.5-.5-2.8-1.7-1-1-1.7-2-2-2.4-.1-.4 0-.5.2-.7l.5-.6.4-.6v-.6L10.4 8c-.3-.6-.6-.5-.8-.6H9c-.2 0-.6.1-.9.5C7.8 8.2 7 9 7 10.7c0 1.7 1.3 3.4 1.4 3.6.2.3 2.5 3.7 6 5.2l1.9.8c.8.2 1.6.2 2.2.1.6-.1 2-.8 2.3-1.6.3-.9.3-1.5.2-1.7l-.7-.4zM14 25.3c-2 0-4-.5-5.8-1.6l-.4-.2-4.4 1.1 1.2-4.2-.3-.5A11.5 11.5 0 0 1 22.1 5.7 11.5 11.5 0 0 1 14 25.3zM14 0A13.8 13.8 0 0 0 2 20.7L0 28l7.3-2A13.8 13.8 0 1 0 14 0z"/></svg>
192
+ <div class="whatsappme__close"><svg width="24" height="24" viewBox="0 0 24 24"><path fill="#fff" d="M24 2.4L21.6 0 12 9.6 2.4 0 0 2.4 9.6 12 0 21.6 2.4 24l9.6-9.6 9.6 9.6 2.4-2.4-9.6-9.6L24 2.4z"/></svg></div>
193
  </header>
194
  <div class="whatsappme__message"><?php echo $this->formated_message(); ?></div>
195
+ <?php if ($copy): ?><div class="whatsappme__copy"><?php echo $copy; ?> <a href="https://wame.chat" rel="noopener" target="_blank"><svg width="72" height="17" viewBox="0 0 72 17"><path fill="#fff" fill-rule="evenodd" d="M25.371 10.429l2.122-6.239h.045l2.054 6.239h-4.22zm32.2 2.397c-.439.495-.88.953-1.325 1.375-.797.755-1.332 1.232-1.604 1.43-.622.438-1.156.706-1.604.805-.447.1-.787.13-1.02.09a3.561 3.561 0 0 1-.7-.239c-.66-.318-1.02-.864-1.079-1.64-.058-.774.03-1.619.263-2.533.35-1.987 1.108-4.133 2.274-6.438a73.481 73.481 0 0 0-2.8 3.04c-.816.954-1.7 2.096-2.653 3.428a44.068 44.068 0 0 0-2.77 4.441c-.738 0-1.341-.159-1.808-.477-.427-.278-.748-.695-.962-1.252-.214-.556-.165-1.41.146-2.563l.204-.626c.097-.298.204-.606.32-.924.117-.318.234-.626.35-.924.117-.298.195-.507.234-.626v.06c.272-.756.603-1.56.991-2.415a56.92 56.92 0 0 1 1.4-2.832 62.832 62.832 0 0 0-3.266 3.875 61.101 61.101 0 0 0-2.945 3.995 57.072 57.072 0 0 0-2.886 4.71c-.387 0-.736-.044-1.048-.131l.195.545h-3.72l-1.23-3.786h-6.093L23.158 17h-3.605l6.16-17h3.674l4.357 12.16c.389-1.35.97-2.736 1.74-4.16a41.336 41.336 0 0 0 2.013-4.232.465.465 0 0 0 .058-.18c0-.039.02-.098.058-.178.04-.08.078-.199.117-.358.039-.159.097-.337.175-.536.039-.12.078-.219.117-.298a.465.465 0 0 0 .058-.18c.078-.277.175-.575.292-.893.116-.318.194-.597.233-.835V.25c-.039-.04-.039-.08 0-.119l.233-.12c.117-.039.292.02.525.18.156.08.292.179.408.298.272.199.564.427.875.685.311.259.583.557.816.895a2.9 2.9 0 0 1 .467 1.043c.078.358.039.735-.117 1.133a8.127 8.127 0 0 1-.35.775c0 .08-.038.159-.116.238a2.93 2.93 0 0 1-.175.298 7.05 7.05 0 0 0-.35.656c-.039.04-.058.07-.058.09 0 .02-.02.05-.059.089a61.988 61.988 0 0 1-1.633 2.385c-.544.755-.913 1.35-1.108 1.788a79.39 79.39 0 0 1 3.5-4.233 101.59 101.59 0 0 1 3.12-3.398C45.651 1.82 46.612.986 47.468.43c.739.278 1.341.596 1.808.954.428.318.768.676 1.02 1.073.253.398.244.835-.029 1.312l-1.4 2.325a36.928 36.928 0 0 0-1.749 3.279 53.748 53.748 0 0 1 1.633-1.848 46.815 46.815 0 0 1 4.024-3.875c.7-.597 1.38-1.113 2.041-1.55.739.278 1.341.596 1.808.953.428.318.768.676 1.02 1.073.253.398.243.835-.029 1.312-.155.318-.408.795-.758 1.43a152.853 152.853 0 0 0-2.04 3.846 97.87 97.87 0 0 0-.467.924c-.35.835-.632 1.55-.846 2.146-.214.597-.282.934-.204 1.014a.63.63 0 0 0 .291-.06c.234-.119.564-.348.992-.685.428-.338.875-.736 1.341-1.193.467-.457.914-.914 1.341-1.37.217-.232.409-.45.575-.657a15.4 15.4 0 0 1 .957-2.514c.34-.696.708-1.333 1.108-1.91.399-.576.778-1.044 1.137-1.402a19.553 19.553 0 0 1 1.796-1.7 32.727 32.727 0 0 1 1.497-1.164 8.821 8.821 0 0 1 1.317-.835C66.292.989 66.83.83 67.269.83c.32 0 .649.11.988.328.34.22.649.478.928.776.28.299.519.607.718.925.2.318.3.557.3.716.04.597-.06 1.253-.3 1.97a7.14 7.14 0 0 1-1.107 2.058 8.534 8.534 0 0 1-1.826 1.76 6.522 6.522 0 0 1-2.395 1.074c-.2.08-.36.06-.48-.06a.644.644 0 0 1-.179-.477c0-.358.14-.616.42-.776.837-.318 1.536-.735 2.095-1.253.559-.517.998-1.034 1.317-1.551.4-.597.699-1.213.898-1.85 0-.199-.09-.308-.27-.328a4.173 4.173 0 0 0-.448-.03 4.83 4.83 0 0 0-1.318.597c-.399.239-.848.577-1.347 1.014-.499.438-1.028 1.015-1.586 1.73-.918 1.154-1.587 2.298-2.006 3.432-.42 1.134-.629 1.979-.629 2.536 0 .915.19 1.482.569 1.7.38.22.728.329 1.048.329.638 0 1.347-.15 2.125-.448a16.248 16.248 0 0 0 2.305-1.104 30.05 30.05 0 0 0 2.126-1.342 27.256 27.256 0 0 0 1.646-1.224c.08-.04.18-.1.3-.179l.24-.12a.54.54 0 0 1 .239-.059c.08 0 .16.02.24.06.08.04.119.16.119.358 0 .239-.08.457-.24.656a19.115 19.115 0 0 1-2.245 1.82 35.445 35.445 0 0 1-2.185 1.403c-.759.437-1.497.855-2.215 1.253a8.461 8.461 0 0 1-1.647.387c-.499.06-.968.09-1.407.09-.998 0-1.796-.16-2.395-.477-.599-.319-1.048-.706-1.347-1.164a4.113 4.113 0 0 1-.599-1.372c-.1-.457-.15-.843-.15-1.161zm-42.354-1.111L17.887 0h3.514L17.02 17h-3.56L10.7 5.428h-.046L7.94 17H4.312L0 0h3.582L6.16 11.571h.045L9.035 0h3.354l2.783 11.715h.045z"/></svg></a></div><?php endif; ?>
196
  </div>
197
  <?php endif; ?>
198
  </div>
381
 
382
  return $global;
383
  }
384
+
385
+ /**
386
+ * Hide on Elementor preview mode.
387
+ * Set 'show' false when is editing on Elementor
388
+ *
389
+ * @since 2.2.3
390
+ * @param object /Elementor/Preview instance
391
+ */
392
+ public function elementor_preview_disable($elementor_preview) {
393
+
394
+ $this->settings['show'] = apply_filters( 'whatsappme_elementor_preview_show', false );
395
+
396
+ }
397
  }
public/css/whatsappme.css CHANGED
@@ -15,6 +15,10 @@
15
  -webkit-user-select: none;
16
  }
17
 
 
 
 
 
18
  .whatsappme--show {
19
  transform: scale3d(1, 1, 1);
20
  transition: transform .5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
@@ -34,6 +38,7 @@
34
  box-shadow: 1px 6px 24px 0 rgba(7, 94, 84, .24);
35
  cursor: pointer;
36
  transition: background-color 0.2s linear;
 
37
  }
38
 
39
  .whatsappme__button:hover {
@@ -154,6 +159,7 @@
154
  opacity: .4;
155
  cursor: pointer;
156
  transition: opacity 300ms ease-out;
 
157
  }
158
 
159
  .whatsappme__close:hover {
15
  -webkit-user-select: none;
16
  }
17
 
18
+ .whatsappme svg path {
19
+ fill: currentColor !important;
20
+ }
21
+
22
  .whatsappme--show {
23
  transform: scale3d(1, 1, 1);
24
  transition: transform .5s cubic-bezier(0.18, 0.89, 0.32, 1.28);
38
  box-shadow: 1px 6px 24px 0 rgba(7, 94, 84, .24);
39
  cursor: pointer;
40
  transition: background-color 0.2s linear;
41
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
42
  }
43
 
44
  .whatsappme__button:hover {
159
  opacity: .4;
160
  cursor: pointer;
161
  transition: opacity 300ms ease-out;
162
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
163
  }
164
 
165
  .whatsappme__close:hover {
public/css/whatsappme.min.css CHANGED
@@ -1 +1 @@
1
- .whatsappme{position:fixed;z-index:400;right:20px;bottom:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:16px;line-height:26px;color:#262626;transform:scale3d(0,0,0);transition:transform .3s ease-in-out;user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none}.whatsappme--show{transform:scale3d(1,1,1);transition:transform .5s cubic-bezier(.18,.89,.32,1.28)}.whatsappme__button{position:absolute;z-index:2;bottom:8px;right:8px;height:60px;min-width:60px;max-width:95vw;background-color:#25d366;color:#fff;border-radius:30px;box-shadow:1px 6px 24px 0 rgba(7,94,84,.24);cursor:pointer;transition:background-color .2s linear}.whatsappme__button:hover{background-color:#128c7e;transition:background-color 1.5s linear}.whatsappme--dialog .whatsappme__button{transition:background-color .2s linear}.whatsappme__button:active{background-color:#075e54;transition:none}.whatsappme__button svg{width:36px;height:36px;margin:12px 12px}.whatsappme__badge{position:absolute;top:-4px;right:-4px;width:20px;height:20px;border:none;border-radius:50%;background:#e82c0c;font-size:12px;font-weight:600;line-height:20px;text-align:center;box-shadow:none;opacity:0;pointer-events:none}.whatsappme__badge.whatsappme__badge--in{animation:badge--in .5s cubic-bezier(.27,.9,.41,1.28) 1 both}.whatsappme__badge.whatsappme__badge--out{animation:badge--out .4s cubic-bezier(.215,.61,.355,1) 1 both}.whatsappme--dialog .whatsappme__button{box-shadow:0 1px 2px 0 rgba(0,0,0,.3)}.whatsappme--dialog .whatsappme__button svg{margin:12px 10px 12px 14px}#wa_ico,.whatsappme--dialog #send_ico{display:block}#send_ico,.whatsappme--dialog #wa_ico{display:none}.whatsappme__box{position:absolute;bottom:0;right:0;z-index:1;width:calc(100vw - 40px);max-width:400px;min-height:280px;padding-bottom:60px;border-radius:32px;background:#ede4dd url(../images/background.png) center repeat-y;background-size:100% auto;box-shadow:0 2px 6px 0 rgba(0,0,0,.5);overflow:hidden;transform:scale3d(0,0,0);opacity:0;transition:opacity .4s ease-out,transform 0s linear .3s}.whatsappme--dialog .whatsappme__box{opacity:1;transform:scale3d(1,1,1);transition:opacity .2s ease-out,transform 0s linear}.whatsappme__header{display:block;position:static;width:100%;height:70px;padding:0 26px;margin:0;background-color:#2e8c7d;color:rgba(255,255,255,.5)}.whatsappme__header svg{height:100%}.whatsappme__close{display:flex;position:absolute;top:18px;right:24px;width:34px;height:34px;border-radius:50%;background:#000;color:#fff;text-align:center;opacity:.4;cursor:pointer;transition:opacity .3s ease-out}.whatsappme__close:hover{opacity:.6}.whatsappme__close svg{display:block;width:12px;height:12px;margin:auto}.whatsappme__message{position:relative;min-height:80px;padding:20px 22px;margin:34px 26px;border-radius:32px;background-color:#fff;color:#4a4a4a;box-shadow:0 1px 2px 0 rgba(0,0,0,.3)}.whatsappme__message:before{content:'';display:block;position:absolute;bottom:30px;left:-18px;width:18px;height:18px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA1CAYAAADlE3NNAAAEr0lEQVRo3t2aT0gjVxzHf++9mcn8zWhW6bpELWzcogFNaRar7a4tBNy2WATbHpacpdZ6redeZE+9CL02B1ktXsRD/xwsilhoSwsqag/xYK09hCQlmCiTf28vGRnGmZhE183MFx5vmGQy7zO/P/P7PYLAHUIAQCqDAwDPxMREG3IpHL+zs/MZcgkYAgAMAIwOl8lkYm6xGgYAFgAEAGgZHx9/vVwun7nJJTkAEAGgdW9v73NKKXWLSzIA4AEAGQDazs/P/3ALnNEl1a2trY9oRW6wmu6SEgC0ZrPZn9wCp2dIHgCU1dXVtymlZafDIatEksvlfqYGueG9xgOAcnBw8JSa5GR3vIi1aDTaUSwWj5wOZ3RHPUN6U6nUN9RCTnZHDwDI+/v745TSkpPhrOpHcWlpq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GP85MjLyBCHE1tPO1LP4eq4FG/hqnlGyeSiwsbHxfygUOu7t7Y00059JUY3ZHFm8k1lT0cGfnJw8c0ojepWFzd6CMpnM3y8AJPEkZ9khO4IAAAAASUVORK5CYII=);background-size:100%}.whatsappme__copy{position:absolute;bottom:4px;left:40px;color:#2e8c7d;font-size:11px;letter-spacing:.2px;opacity:.4;transition:opacity .25s}.whatsappme--left .whatsappme__copy{left:auto;right:40px}.whatsappme__copy:hover{opacity:.8;transition:opacity .5s ease-out .5s}.whatsappme__copy a,.whatsappme__copy a:active,.whatsappme__copy a:hover{color:inherit;text-decoration:none}.whatsappme__copy svg{width:40px;height:10px;vertical-align:inherit}.whatsappme--left{right:auto;left:20px}.whatsappme--left .whatsappme__button{right:auto;left:8px}.whatsappme--left .whatsappme__box{right:auto;left:0}@media (max-width:480px){.whatsappme{bottom:6px;right:6px}.whatsappme--left{right:auto;left:6px}.whatsappme__box{width:calc(100vw - 12px);min-height:0}.whatsappme__header{height:55px}.whatsappme__close{top:13px;width:28px;height:28px}.whatsappme__message{padding:14px 20px;margin:15px 21px 20px;line-height:24px}}@keyframes badge--in{from{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}@keyframes badge--out{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-20px)}}
1
+ .whatsappme{position:fixed;z-index:400;right:20px;bottom:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif;font-size:16px;line-height:26px;color:#262626;transform:scale3d(0,0,0);transition:transform .3s ease-in-out;user-select:none;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none}.whatsappme svg path{fill:currentColor!important}.whatsappme--show{transform:scale3d(1,1,1);transition:transform .5s cubic-bezier(.18,.89,.32,1.28)}.whatsappme__button{position:absolute;z-index:2;bottom:8px;right:8px;height:60px;min-width:60px;max-width:95vw;background-color:#25d366;color:#fff;border-radius:30px;box-shadow:1px 6px 24px 0 rgba(7,94,84,.24);cursor:pointer;transition:background-color .2s linear;-webkit-tap-highlight-color:transparent}.whatsappme__button:hover{background-color:#128c7e;transition:background-color 1.5s linear}.whatsappme--dialog .whatsappme__button{transition:background-color .2s linear}.whatsappme__button:active{background-color:#075e54;transition:none}.whatsappme__button svg{width:36px;height:36px;margin:12px 12px}.whatsappme__badge{position:absolute;top:-4px;right:-4px;width:20px;height:20px;border:none;border-radius:50%;background:#e82c0c;font-size:12px;font-weight:600;line-height:20px;text-align:center;box-shadow:none;opacity:0;pointer-events:none}.whatsappme__badge.whatsappme__badge--in{animation:badge--in .5s cubic-bezier(.27,.9,.41,1.28) 1 both}.whatsappme__badge.whatsappme__badge--out{animation:badge--out .4s cubic-bezier(.215,.61,.355,1) 1 both}.whatsappme--dialog .whatsappme__button{box-shadow:0 1px 2px 0 rgba(0,0,0,.3)}.whatsappme--dialog .whatsappme__button svg{margin:12px 10px 12px 14px}#wa_ico,.whatsappme--dialog #send_ico{display:block}#send_ico,.whatsappme--dialog #wa_ico{display:none}.whatsappme__box{position:absolute;bottom:0;right:0;z-index:1;width:calc(100vw - 40px);max-width:400px;min-height:280px;padding-bottom:60px;border-radius:32px;background:#ede4dd url(../images/background.png) center repeat-y;background-size:100% auto;box-shadow:0 2px 6px 0 rgba(0,0,0,.5);overflow:hidden;transform:scale3d(0,0,0);opacity:0;transition:opacity .4s ease-out,transform 0s linear .3s}.whatsappme--dialog .whatsappme__box{opacity:1;transform:scale3d(1,1,1);transition:opacity .2s ease-out,transform 0s linear}.whatsappme__header{display:block;position:static;width:100%;height:70px;padding:0 26px;margin:0;background-color:#2e8c7d;color:rgba(255,255,255,.5)}.whatsappme__header svg{height:100%}.whatsappme__close{display:flex;position:absolute;top:18px;right:24px;width:34px;height:34px;border-radius:50%;background:#000;color:#fff;text-align:center;opacity:.4;cursor:pointer;transition:opacity .3s ease-out;-webkit-tap-highlight-color:transparent}.whatsappme__close:hover{opacity:.6}.whatsappme__close svg{display:block;width:12px;height:12px;margin:auto}.whatsappme__message{position:relative;min-height:80px;padding:20px 22px;margin:34px 26px;border-radius:32px;background-color:#fff;color:#4a4a4a;box-shadow:0 1px 2px 0 rgba(0,0,0,.3)}.whatsappme__message:before{content:'';display:block;position:absolute;bottom:30px;left:-18px;width:18px;height:18px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA1CAYAAADlE3NNAAAEr0lEQVRo3t2aT0gjVxzHf++9mcn8zWhW6bpELWzcogFNaRar7a4tBNy2WATbHpacpdZ6redeZE+9CL02B1ktXsRD/xwsilhoSwsqag/xYK09hCQlmCiTf28vGRnGmZhE183MFx5vmGQy7zO/P/P7PYLAHUIAQCqDAwDPxMREG3IpHL+zs/MZcgkYAgAMAIwOl8lkYm6xGgYAFgAEAGgZHx9/vVwun7nJJTkAEAGgdW9v73NKKXWLSzIA4AEAGQDazs/P/3ALnNEl1a2trY9oRW6wmu6SEgC0ZrPZn9wCp2dIHgCU1dXVtymlZafDIatEksvlfqYGueG9xgOAcnBw8JSa5GR3vIi1aDTaUSwWj5wOZ3RHPUN6U6nUN9RCTnZHDwDI+/v745TSkpPhrOpHcWlpqbdcLieojZwGpseZMDo66svn87/RKnIaGAsAfCAQ8J6dnX1Pr5DjwABAzmazMVqDHAd2enr6La1RjgGLRCJqLpeL0TrUjFDGrMgCAD8/P38vn8//QutUs1pLT/fC5ubmQKFQOKANqNmspbuhBwDEZDL5BaX0lDaoZoK62NxZXFzs1DRthV5TrxrKGFue/v5+KZ1Of1kul5P0BtQUUAAgxOPx9wuFwl/0BvWq3O8C6vDw8F1N036gL0G3ZaVLUEdHRxFN036kL1E3DWMHxAEAPzc3dyedTk+XSqUdegu6CRijy5mBPLOzs2oikfhU07RFSmmG3qKuaxkdxuhy/MzMjDeRSHyiadrz2wYyClUBMh9bzRfAu7u7PX6//z1RFB9zHBcBALUZKoRqUMgEgyvHeHt7+353d/cjQRBGWJZ9jBDqaMYKHKpYBAEAXltbawsGg2FFUd7iOO4hIeQhQuiOEzpdOzCSTCaftLS0fEUIGXbiHiBjU5njVCr1sc/nW6wkDcduS1u1HKRUKv2KMR4ABwvbAWKMA+BwYbsasFgs/uMWuEtxd3x8/J3b4C4Ag8Hg83g8/iyfz//n5IRi1eZzla00HgA8oijyDMNwlFJCCGH0axiGQQAAXq+XyLLMeL1eRlEURpZlRpIkhud5oigK297eLvl8Prm1tVVSFEWSJEkWRVESBMGrqupriqLcFQThLsaYu612n6vUip4KMFv5HJssjhooEi5laoZh0NjYWNvw8PC9np6ejkAg8MDv9w+oqnrfxsNqhgNTh2wE1MGYChyyWGA9RYJVFWTM3MhwjMPhsDw9PT0QDocHOjs731RV9Y1rv+cMlb4Oiy3garWW1b2sPMfceZgHmZqa6pycnPywr6/vA47jfPXAWbU0xOCOqE44u2K8Wl9oBUfMa+rq6hIWFhbGBwcHn9pBohogcRWwRiCRTUiACQ6ZYpxY9JAkFAopy8vLM4FAYKyRrgA1GGf1JperLGgEM4cNG4vF3olGo18TQkT9JsRmAdQw66NsGlbn7Ibdd0um2XzOblz6/ZWVlX8JIb8PDQ090gFJDU+e2sBeZ1hBU9NcqvIQzDMFALq+vp7GGP85MjLyBCHE1tPO1LP4eq4FG/hqnlGyeSiwsbHxfygUOu7t7Y00059JUY3ZHFm8k1lT0cGfnJw8c0ojepWFzd6CMpnM3y8AJPEkZ9khO4IAAAAASUVORK5CYII=);background-size:100%}.whatsappme__copy{position:absolute;bottom:4px;left:40px;color:#2e8c7d;font-size:11px;letter-spacing:.2px;opacity:.4;transition:opacity .25s}.whatsappme--left .whatsappme__copy{left:auto;right:40px}.whatsappme__copy:hover{opacity:.8;transition:opacity .5s ease-out .5s}.whatsappme__copy a,.whatsappme__copy a:active,.whatsappme__copy a:hover{color:inherit;text-decoration:none}.whatsappme__copy svg{width:40px;height:10px;vertical-align:inherit}.whatsappme--left{right:auto;left:20px}.whatsappme--left .whatsappme__button{right:auto;left:8px}.whatsappme--left .whatsappme__box{right:auto;left:0}@media (max-width:480px){.whatsappme{bottom:6px;right:6px}.whatsappme--left{right:auto;left:6px}.whatsappme__box{width:calc(100vw - 12px);min-height:0}.whatsappme__header{height:55px}.whatsappme__close{top:13px;width:28px;height:28px}.whatsappme__message{padding:14px 20px;margin:15px 21px 20px;line-height:24px}}@keyframes badge--in{from{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}@keyframes badge--out{0%{opacity:1;transform:translateY(0)}100%{opacity:0;transform:translateY(-20px)}}
public/js/whatsappme.js CHANGED
@@ -67,12 +67,12 @@
67
  }
68
 
69
  if (has_cta && !is_mobile) {
70
- $('.whatsappme__button')
71
  .mouseenter(function () { timeoutID = setTimeout(show_dialog, 1500); })
72
  .mouseleave(function () { clearTimeout(timeoutID); });
73
  }
74
 
75
- $('.whatsappme__button').click(function () {
76
  var link = whatsapp_link(wa_web, wame_settings.telephone, wame_settings.message_send);
77
 
78
  if (has_cta && !$whatsappme.hasClass('whatsappme--dialog')) {
@@ -86,7 +86,7 @@
86
  }
87
  });
88
 
89
- $('.whatsappme__close').click(function () {
90
  $whatsappme.removeClass('whatsappme--dialog');
91
  save_message_viewed();
92
  });
67
  }
68
 
69
  if (has_cta && !is_mobile) {
70
+ $('.whatsappme__button', $whatsappme)
71
  .mouseenter(function () { timeoutID = setTimeout(show_dialog, 1500); })
72
  .mouseleave(function () { clearTimeout(timeoutID); });
73
  }
74
 
75
+ $('.whatsappme__button', $whatsappme).click(function () {
76
  var link = whatsapp_link(wa_web, wame_settings.telephone, wame_settings.message_send);
77
 
78
  if (has_cta && !$whatsappme.hasClass('whatsappme--dialog')) {
86
  }
87
  });
88
 
89
+ $('.whatsappme__close', $whatsappme).click(function () {
90
  $whatsappme.removeClass('whatsappme--dialog');
91
  save_message_viewed();
92
  });
public/js/whatsappme.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";e(function(){var t,a=3e3,s=e(".whatsappme"),n=s.find(".whatsappme__badge"),o=s.data("settings");try{localStorage.setItem("test",1),localStorage.removeItem("test"),t=localStorage}catch(e){t={_data:{},setItem:function(e,t){this._data[e]=String(t)},getItem:function(e){return this._data.hasOwnProperty(e)?this._data[e]:null}}}if(void 0===o)try{o=JSON.parse(s.attr("data-settings"))}catch(e){o=void 0}s.length&&o&&o.telephone&&function(){var i,p,m,c,h=!!navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i),l=""!==o.message_text,r=o.whastapp_web&&!h,d=(t.getItem("whatsappme_hashes")||"").split(",").filter(Boolean),u="yes"==t.getItem("whatsappme_visited");l&&(i=function(e){for(var t=0,a=1;t<e.length;t++)a=Math.imul(a+e.charCodeAt(t)|0,2654435761);return(a^a>>>17)>>>0}(o.message_text).toString(),p=d.indexOf(i)>-1);t.setItem("whatsappme_visited","yes"),(!o.mobile_only||h)&&(setTimeout(function(){s.addClass("whatsappme--show")},a),l&&!p&&(o.message_badge?c=setTimeout(function(){n.addClass("whatsappme__badge--in")},a+o.message_delay):u&&(c=setTimeout(function(){s.addClass("whatsappme--dialog")},a+o.message_delay))));l&&!h&&e(".whatsappme__button").mouseenter(function(){m=setTimeout(g,1500)}).mouseleave(function(){clearTimeout(m)});function g(){s.addClass("whatsappme--dialog"),clearTimeout(c),o.message_badge&&n.hasClass("whatsappme__badge--in")&&(n.removeClass("whatsappme__badge--in").addClass("whatsappme__badge--out"),_())}function _(){l&&!p&&(d.push(i),t.setItem("whatsappme_hashes",d.join(",")),p=!0)}e(".whatsappme__button").click(function(){var e=function(e,t,a){return(e?"https://web.whatsapp.com/send":"https://api.whatsapp.com/send")+"?phone="+encodeURIComponent(t)+"&text="+encodeURIComponent(a||"")}(r,o.telephone,o.message_send);l&&!s.hasClass("whatsappme--dialog")?g():(s.removeClass("whatsappme--dialog"),_(),function(e){"object"==typeof dataLayer&&dataLayer.push({event:"WhatsAppMe",eventAction:"click",eventLabel:e});if("function"==typeof gtag)gtag("event","click",{event_category:"WhatsAppMe",event_label:e,transport_type:"beacon"});else if("function"==typeof ga){ga("set","transport","beacon");var t=ga.getAll();t.forEach(function(t){t.send("event","WhatsAppMe","click",e)})}}(e),window.open(e,"whatsappme"))}),e(".whatsappme__close").click(function(){s.removeClass("whatsappme--dialog"),_()})}()}),Math.imul=Math.imul||function(e,t){var a=65535&e,s=65535&t;return a*s+((e>>>16&65535)*s+a*(t>>>16&65535)<<16>>>0)|0}}(jQuery);
1
+ !function(e){"use strict";e(function(){var t,a=3e3,s=e(".whatsappme"),n=s.find(".whatsappme__badge"),o=s.data("settings");try{localStorage.setItem("test",1),localStorage.removeItem("test"),t=localStorage}catch(e){t={_data:{},setItem:function(e,t){this._data[e]=String(t)},getItem:function(e){return this._data.hasOwnProperty(e)?this._data[e]:null}}}if(void 0===o)try{o=JSON.parse(s.attr("data-settings"))}catch(e){o=void 0}s.length&&o&&o.telephone&&function(){var i,p,m,c,h=!!navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i),l=""!==o.message_text,r=o.whastapp_web&&!h,d=(t.getItem("whatsappme_hashes")||"").split(",").filter(Boolean),u="yes"==t.getItem("whatsappme_visited");l&&(i=function(e){for(var t=0,a=1;t<e.length;t++)a=Math.imul(a+e.charCodeAt(t)|0,2654435761);return(a^a>>>17)>>>0}(o.message_text).toString(),p=d.indexOf(i)>-1);t.setItem("whatsappme_visited","yes"),(!o.mobile_only||h)&&(setTimeout(function(){s.addClass("whatsappme--show")},a),l&&!p&&(o.message_badge?c=setTimeout(function(){n.addClass("whatsappme__badge--in")},a+o.message_delay):u&&(c=setTimeout(function(){s.addClass("whatsappme--dialog")},a+o.message_delay))));l&&!h&&e(".whatsappme__button",s).mouseenter(function(){m=setTimeout(g,1500)}).mouseleave(function(){clearTimeout(m)});function g(){s.addClass("whatsappme--dialog"),clearTimeout(c),o.message_badge&&n.hasClass("whatsappme__badge--in")&&(n.removeClass("whatsappme__badge--in").addClass("whatsappme__badge--out"),_())}function _(){l&&!p&&(d.push(i),t.setItem("whatsappme_hashes",d.join(",")),p=!0)}e(".whatsappme__button",s).click(function(){var e=function(e,t,a){return(e?"https://web.whatsapp.com/send":"https://api.whatsapp.com/send")+"?phone="+encodeURIComponent(t)+"&text="+encodeURIComponent(a||"")}(r,o.telephone,o.message_send);l&&!s.hasClass("whatsappme--dialog")?g():(s.removeClass("whatsappme--dialog"),_(),function(e){"object"==typeof dataLayer&&dataLayer.push({event:"WhatsAppMe",eventAction:"click",eventLabel:e});if("function"==typeof gtag)gtag("event","click",{event_category:"WhatsAppMe",event_label:e,transport_type:"beacon"});else if("function"==typeof ga){ga("set","transport","beacon");var t=ga.getAll();t.forEach(function(t){t.send("event","WhatsAppMe","click",e)})}}(e),window.open(e,"whatsappme"))}),e(".whatsappme__close",s).click(function(){s.removeClass("whatsappme--dialog"),_()})}()}),Math.imul=Math.imul||function(e,t){var a=65535&e,s=65535&t;return a*s+((e>>>16&65535)*s+a*(t>>>16&65535)<<16>>>0)|0}}(jQuery);
whatsappme.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: WhatsApp me
10
  * Plugin URI: https://wame.chat
11
  * Description: The perfect plugin to engage and retain customers. Support for ecommerce and online stores.
12
- * Version: 2.2.2
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
@@ -27,7 +27,7 @@ if ( ! defined( 'WPINC' ) ) {
27
  * Currently plugin version.
28
  * Start at version 1.0.0 and use SemVer - https://semver.org
29
  */
30
- define( 'WHATSAPPME_VERSION', '2.2.2' );
31
 
32
  /**
33
  * The core plugin class that is used to define internationalization,
9
  * Plugin Name: WhatsApp me
10
  * Plugin URI: https://wame.chat
11
  * Description: The perfect plugin to engage and retain customers. Support for ecommerce and online stores.
12
+ * Version: 2.2.3
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
27
  * Currently plugin version.
28
  * Start at version 1.0.0 and use SemVer - https://semver.org
29
  */
30
+ define( 'WHATSAPPME_VERSION', '2.2.3' );
31
 
32
  /**
33
  * The core plugin class that is used to define internationalization,