WhatsApp me - Version 3.2.0

Version Description

  • NEW: Dark mode.
  • NEW: Hide on mobile when keyboard is open.
  • NEW: Post metabox show main WAme settings as placeholders.
  • CHANGED webp support is now on server side.
  • CHANGED rewrite of chatbox output, SVGs separated, full chatbox scroll and new filters.
  • FIX 'apply_filters_deprecated' fatal error on WP < 4.6
Download this release

Release Info

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

Code changes from version 3.1.4 to 3.2.0

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: whatsapp business, whatsapp, click to chat, button, whatsapp support chat,
5
  Requires at least: 3.0.1
6
  Tested up to: 5.3
7
  Requires PHP: 5.3
8
- Stable tag: 3.1.4
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -13,23 +13,22 @@ Connects a WordPress chat with WhatsApp. The best solution for marketing and sup
13
 
14
  == Description ==
15
 
16
- [wame.chat](https://wame.chat) | [Add-Ons](https://wame.chat/addons/) | [Plugin support](https://wame.chat/en/support/)
17
 
18
  ### Connect a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
19
 
20
- ### New in WAme 3.0 📍
21
 
22
- 🔮 **Magic WhatsApp button**. Add your logo, profile picture or even an animated gif. You can define a tooltip to capture the user's attention, the limit is set by your creativity.
23
-
24
- 🛒 **Better Integration with WooCommerce**. Define CTAs and Custom Messages for product pages, you can use dynamic variables such as {SKU}, {PRICE} or {PRODUCT}.
25
-
26
- 📈 **Facebook Pixel integration**. Sends a custom event when user launch WhatsApp.
27
 
28
  ### ⌁ What you can do with WAme ✅
29
 
30
  #### 🛎 Insert a WhatsApp button on your website.
31
  Define in which pages or zones it should appear, the delay time, if you want it to the right or to the left, only on mobile phones or also on the desktop.
32
 
 
 
 
33
  #### 📱 Add multiple phone numbers.
34
  You can serve users in different terminals, you can insert a different one in each page, product or section.
35
 
@@ -42,6 +41,9 @@ For users to click on the button, use custom CTAs on each page, product or secti
42
  #### 💬 Customize conversation start messages.
43
  So that the user does not waste time in writing. This way you will be able to know from which page it comes or what product is being consulted when you start the first conversation.
44
 
 
 
 
45
  #### 🏁 Analyze the conversion data in Google Analytics and Facebook Pixel.
46
  Remember, you do not have to do anything, the plugin already creates and computes the events by itself. [You can read more about this topic here](https://wame.chat/es/wame-mide-los-eventos-de-whatsapp-en-google-analytics/).
47
 
@@ -63,12 +65,11 @@ Having many options is not an advantage, the configuration of WAme is so easy th
63
  -[Translate into your language](https://translate.wordpress.org/projects/wp-plugins/creame-whatsapp-me)
64
 
65
  ### ⌁ If you like WAme 😍
66
- 1. Subscribe to [our newsletter and our blog](https://wame.chat/blog/).
67
- 2. Learn from our tutorials on [Youtube Channel](https://www.youtube.com/channel/UCqHiSNPBaQ918fpVnCU1wog/).
68
- 3. Or rate us [on WordPress](https://wordpress.org/support/plugin/creame-whatsapp-me/reviews/#new-post).
69
 
70
- *WhatsApp and WhatsApp Logo are brand assets and trademark of Facebook, Inc.*
71
- *WAme is not in partnership, sponsored or endorsed by Facebook, Inc.*
72
 
73
  == Installation ==
74
 
@@ -148,6 +149,14 @@ There is a Javascript event that WAme triggers automatically before launch Whats
148
 
149
  == Changelog ==
150
 
 
 
 
 
 
 
 
 
151
  = 3.1.4 =
152
  * FIX php warning with new var {DISCOUNT} when price is zero.
153
 
5
  Requires at least: 3.0.1
6
  Tested up to: 5.3
7
  Requires PHP: 5.3
8
+ Stable tag: 3.2.0
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
13
 
14
  == Description ==
15
 
16
+ [wame.chat](https://wame.chat?utm_source=wporg&utm_medium=web&utm_campaign=v3_2) | [Add-Ons](https://wame.chat/en/addons/?utm_source=wporg&utm_medium=web&utm_campaign=v3_2) | [Docs](https://wame.chat/en/docs/?utm_source=wporg&utm_medium=web&utm_campaign=v3_2) | [Support](https://wame.chat/en/support/?utm_source=wporg&utm_medium=web&utm_campaign=v3_2)
17
 
18
  ### Connect a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
19
 
20
+ ### New in WAme 3.2 📍
21
 
22
+ 🌚 **Discover the new Dark Mode.** Great news for all those who prefer white text on a black background. Now you will find an option to activate it in your settings.
 
 
 
 
23
 
24
  ### ⌁ What you can do with WAme ✅
25
 
26
  #### 🛎 Insert a WhatsApp button on your website.
27
  Define in which pages or zones it should appear, the delay time, if you want it to the right or to the left, only on mobile phones or also on the desktop.
28
 
29
+ #### 🔮 Magic WhatsApp button.
30
+ Add your logo, profile picture or even an animated gif. You can define a tooltip to capture the user's attention, the limit is set by your creativity.
31
+
32
  #### 📱 Add multiple phone numbers.
33
  You can serve users in different terminals, you can insert a different one in each page, product or section.
34
 
41
  #### 💬 Customize conversation start messages.
42
  So that the user does not waste time in writing. This way you will be able to know from which page it comes or what product is being consulted when you start the first conversation.
43
 
44
+ #### 🛒 Integration with WooCommerce.
45
+ Define CTAs and Custom Messages for product pages, you can use dynamic variables such as {SKU}, {PRICE} or {PRODUCT}.
46
+
47
  #### 🏁 Analyze the conversion data in Google Analytics and Facebook Pixel.
48
  Remember, you do not have to do anything, the plugin already creates and computes the events by itself. [You can read more about this topic here](https://wame.chat/es/wame-mide-los-eventos-de-whatsapp-en-google-analytics/).
49
 
65
  -[Translate into your language](https://translate.wordpress.org/projects/wp-plugins/creame-whatsapp-me)
66
 
67
  ### ⌁ If you like WAme 😍
68
+ 1. Please leave us a [★★★★★](https://wordpress.org/support/plugin/creame-whatsapp-me/reviews/#new-post) rating. We'll thank you.
69
+ 2. Subscribe to our newsletter and visit our blog at [wame.chat](https://wame.chat/?utm_source=wporg&utm_medium=web&utm_campaign=v3_2).
70
+ 3. Follow [@wamechat](https://twitter.com/wamechat) on twitter.
71
 
72
+ *WhatsApp and WhatsApp Logo are brand assets and trademark of Facebook, Inc. WAme is not in partnership, sponsored or endorsed by Facebook, Inc.*
 
73
 
74
  == Installation ==
75
 
149
 
150
  == Changelog ==
151
 
152
+ = 3.2.0 =
153
+ * **NEW:** Dark mode.
154
+ * **NEW:** Hide on mobile when keyboard is open.
155
+ * **NEW:** Post metabox show main WAme settings as placeholders.
156
+ * CHANGED webp support is now on server side.
157
+ * CHANGED rewrite of chatbox output, SVGs separated, full chatbox scroll and new filters.
158
+ * FIX 'apply_filters_deprecated' fatal error on WP < 4.6
159
+
160
  = 3.1.4 =
161
  * FIX php warning with new var {DISCOUNT} when price is zero.
162
 
admin/class-whatsappme-admin.php CHANGED
@@ -71,7 +71,7 @@ class WhatsAppMe_Admin {
71
  $this->version = $version;
72
 
73
  // Updated in get_settings() at 'admin_init' hook
74
- $this->enhanced_phone = '16.0.3'; // intl-tel-input version
75
  $this->tabs = array();
76
  $this->settings = array();
77
 
@@ -94,7 +94,8 @@ class WhatsAppMe_Admin {
94
 
95
  // Admin tabs
96
  $this->tabs = apply_filters(
97
- 'whatsappme_admin_tabs', array(
 
98
  'general' => __( 'General', 'creame-whatsapp-me' ),
99
  'advanced' => __( 'Advanced', 'creame-whatsapp-me' ),
100
  )
@@ -116,6 +117,7 @@ class WhatsAppMe_Admin {
116
  'message_start' => __( 'Open chat', 'creame-whatsapp-me' ),
117
  'position' => 'right',
118
  'visibility' => array( 'all' => 'yes' ),
 
119
  ),
120
  apply_filters( 'whatsappme_extra_settings', array() )
121
  );
@@ -249,6 +251,7 @@ class WhatsAppMe_Admin {
249
  'message_start' => '<label for="whatsappme_message_start">' . __( 'Start WhatsApp Button', 'creame-whatsapp-me' ) . '</label>',
250
  'message_delay' => '<label for="whatsappme_message_delay">' . __( 'Chat Delay', 'creame-whatsapp-me' ) . '</label>',
251
  'message_badge' => __( 'Notification Balloon', 'creame-whatsapp-me' ),
 
252
  ),
253
  );
254
 
@@ -343,9 +346,11 @@ class WhatsAppMe_Admin {
343
  $input['message_start'] = $util::substr( $util::clean_input( $input['message_start'] ), 0, 20 );
344
  $input['message_delay'] = intval( $input['message_delay'] );
345
  $input['position'] = $input['position'] != 'left' ? 'right' : 'left';
 
346
  if ( isset( $input['view'] ) ) {
347
  $input['visibility'] = array_filter(
348
- $input['view'], function( $v ) {
 
349
  return 'yes' == $v || 'no' == $v;
350
  }
351
  );
@@ -472,14 +477,16 @@ class WhatsAppMe_Admin {
472
  } else {
473
 
474
  $value = isset( $this->settings[ $field_id ] ) ? $this->settings[ $field_id ] : '';
 
475
 
476
  switch ( $field_id ) {
477
  case 'telephone':
478
  $output = '<input id="whatsappme_phone" ' . ( $this->enhanced_phone ? 'data-' : '' ) . 'name="whatsappme[telephone]" value="' . $value . '" type="text" style="width:15em">' .
479
  '<p class="description">' . __( "Contact phone number <strong>(the button will not be shown if it's empty)</strong>", 'creame-whatsapp-me' ) . '</p>' .
480
  '<p class="whatsappme-addon">' . sprintf(
481
- __( 'Add unlimited numbers with %s', 'creame-whatsapp-me' ),
482
- '<a href="https://wame.chat/en/addons/wame-random-phone/" target="_blank">\'WAme Random Phone\'</a>'
 
483
  ) . '</p>';
484
  break;
485
 
@@ -530,7 +537,7 @@ class WhatsAppMe_Admin {
530
  '<p class="description">' . __( 'Define a text to encourage users to contact by WhatsApp', 'creame-whatsapp-me' ) . '</p>' .
531
  '<p class="whatsappme-addon">' . sprintf(
532
  __( 'Add links, images, videos and more with %s', 'creame-whatsapp-me' ),
533
- '<a href="https://wame.chat/en/addons/wame-cta-extras/" target="_blank">\'WAme CTA Extras\'</a>'
534
  ) . '</p>';
535
  break;
536
 
@@ -555,6 +562,16 @@ class WhatsAppMe_Admin {
555
  __( 'Display a notification balloon instead of opening the Chat Window for a "less intrusive" mode', 'creame-whatsapp-me' ) . '</label></fieldset>';
556
  break;
557
 
 
 
 
 
 
 
 
 
 
 
558
  default:
559
  $output = '';
560
  break;
@@ -576,7 +593,8 @@ class WhatsAppMe_Admin {
576
  $value = ( isset( $this->settings['visibility']['all'] ) && 'no' == $this->settings['visibility']['all'] ) ? 'no' : 'yes';
577
 
578
  $inheritance = apply_filters(
579
- 'whatsappme_advanced_inheritance', array(
 
580
  'all' => array( 'front_page', 'blog_page', '404_page', 'search', 'archive', 'singular', 'cpts' ),
581
  'archive' => array( 'date', 'author' ),
582
  'singular' => array( 'page', 'post' ),
@@ -584,7 +602,7 @@ class WhatsAppMe_Admin {
584
  );
585
 
586
  echo '<div class="whatsappme_view_all" data-inheritance="' . esc_attr( json_encode( $inheritance ) ) . '">' .
587
- '<label><input type="radio" name="whatsappme[view][all]" value="yes"' . checked( 'yes', $value, false ) . '> ' .
588
  '<span class="dashicons dashicons-visibility" title="' . __( 'Show', 'creame-whatsapp-me' ) . '"></span></label>' .
589
  '<label><input type="radio" name="whatsappme[view][all]" value="no"' . checked( 'no', $value, false ) . '> ' .
590
  '<span class="dashicons dashicons-hidden" title="' . __( 'Hide', 'creame-whatsapp-me' ) . '"></span></label></div>';
@@ -612,6 +630,41 @@ class WhatsAppMe_Admin {
612
  */
613
  function help_tab() {
614
  $screen = get_current_screen();
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
615
 
616
  $screen->add_help_tab(
617
  array(
@@ -630,32 +683,6 @@ class WhatsAppMe_Admin {
630
  )
631
  );
632
 
633
- $screen->add_help_tab(
634
- array(
635
- 'id' => 'support',
636
- 'title' => __( 'Support and Help', 'creame-whatsapp-me' ),
637
- 'content' =>
638
- '<p>' . sprintf(
639
- __( 'If you need help, please check the <a href="%s" rel="external" target="_blank">plugin support forum</a>.', 'creame-whatsapp-me' ),
640
- esc_url( 'https://wordpress.org/support/plugin/creame-whatsapp-me/' )
641
- ) . '</p>' .
642
- '<p>' . __( 'If you like WAme 😍', 'creame-whatsapp-me' ) . '</p>' .
643
- '<ul>' .
644
- '<li>' . sprintf(
645
- __( 'Subscribe to our newsletter and our blog at %s.', 'creame-whatsapp-me' ),
646
- '<a href="https://wame.chat/blog/" rel="external" target="_blank">wame.chat</a>'
647
- ) . '</li>' .
648
- '<li>' . sprintf(
649
- __( 'Learn from our tutorials on %s.', 'creame-whatsapp-me' ),
650
- '<a href="https://www.youtube.com/channel/UCqHiSNPBaQ918fpVnCU1wog/" rel="external" target="_blank">Youtube</a>'
651
- ) . '</li>' .
652
- '<li>' . sprintf(
653
- __( 'Or rate us on %s.', 'creame-whatsapp-me' ),
654
- '<a href="https://wordpress.org/support/plugin/creame-whatsapp-me/reviews/#new-post" rel="external" target="_blank">WordPress.org</a>'
655
- ) . '</li>' .
656
- '</ul>',
657
- )
658
- );
659
  }
660
 
661
  /**
@@ -752,6 +779,7 @@ class WhatsAppMe_Admin {
752
  * @since 2.0.0 Now can set as [show, hide, default]
753
  * @since 2.2.0 Enqueue scripts/styles. Added "telephone"
754
  * @since 3.0.3 Capture and filter output
 
755
  * @access public
756
  * @return void
757
  */
@@ -773,7 +801,8 @@ class WhatsAppMe_Admin {
773
  'message_send' => '',
774
  'hide' => false,
775
  'view' => '',
776
- ), $metadata
 
777
  );
778
 
779
  // Move old 'hide' to new 'view' field
@@ -782,7 +811,18 @@ class WhatsAppMe_Admin {
782
  }
783
  unset( $metadata['hide'] );
784
 
785
- $metabox_vars = apply_filters( 'whatsappme_metabox_vars', array( 'SITE', 'URL', 'TITLE' ) );
 
 
 
 
 
 
 
 
 
 
 
786
 
787
  ob_start();
788
  ?>
@@ -790,15 +830,15 @@ class WhatsAppMe_Admin {
790
  <?php wp_nonce_field( 'whatsappme_data', 'whatsappme_nonce' ); ?>
791
  <p>
792
  <label for="whatsappme_phone"><?php _e( 'Telephone', 'creame-whatsapp-me' ); ?></label><br>
793
- <input id="whatsappme_phone" <?php echo $this->enhanced_phone ? 'data-' : ''; ?>name="whatsappme_telephone" value="<?php echo $metadata['telephone']; ?>" type="text">
794
  </p>
795
  <p>
796
  <label for="whatsappme_message"><?php _e( 'Call to Action', 'creame-whatsapp-me' ); ?></label><br>
797
- <textarea id="whatsappme_message" name="whatsappme_message" rows="2" class="large-text"><?php echo $metadata['message_text']; ?></textarea>
798
  </p>
799
  <p>
800
  <label for="whatsappme_message_send"><?php _e( 'Message', 'creame-whatsapp-me' ); ?></label><br>
801
- <textarea id="whatsappme_message_send" name="whatsappme_message_send" rows="2" class="large-text"><?php echo $metadata['message_send']; ?></textarea>
802
  <?php if ( count( $metabox_vars ) ) : ?>
803
  <small><?php _e( 'You can use vars', 'creame-whatsapp-me' ); ?> <code>{<?php echo join( '}</code> <code>{', $metabox_vars ); ?>}</code></small>
804
  <?php endif; ?>
@@ -874,5 +914,4 @@ class WhatsAppMe_Admin {
874
 
875
  }
876
 
877
-
878
  }
71
  $this->version = $version;
72
 
73
  // Updated in get_settings() at 'admin_init' hook
74
+ $this->enhanced_phone = '16.0.8'; // intl-tel-input version
75
  $this->tabs = array();
76
  $this->settings = array();
77
 
94
 
95
  // Admin tabs
96
  $this->tabs = apply_filters(
97
+ 'whatsappme_admin_tabs',
98
+ array(
99
  'general' => __( 'General', 'creame-whatsapp-me' ),
100
  'advanced' => __( 'Advanced', 'creame-whatsapp-me' ),
101
  )
117
  'message_start' => __( 'Open chat', 'creame-whatsapp-me' ),
118
  'position' => 'right',
119
  'visibility' => array( 'all' => 'yes' ),
120
+ 'dark_mode' => 'no',
121
  ),
122
  apply_filters( 'whatsappme_extra_settings', array() )
123
  );
251
  'message_start' => '<label for="whatsappme_message_start">' . __( 'Start WhatsApp Button', 'creame-whatsapp-me' ) . '</label>',
252
  'message_delay' => '<label for="whatsappme_message_delay">' . __( 'Chat Delay', 'creame-whatsapp-me' ) . '</label>',
253
  'message_badge' => __( 'Notification Balloon', 'creame-whatsapp-me' ),
254
+ 'dark_mode' => __( 'Dark Mode', 'creame-whatsapp-me' ),
255
  ),
256
  );
257
 
346
  $input['message_start'] = $util::substr( $util::clean_input( $input['message_start'] ), 0, 20 );
347
  $input['message_delay'] = intval( $input['message_delay'] );
348
  $input['position'] = $input['position'] != 'left' ? 'right' : 'left';
349
+ $input['dark_mode'] = in_array( $input['dark_mode'], array( 'no', 'yes', 'auto' ) ) ? $input['dark_mode'] : 'no';
350
  if ( isset( $input['view'] ) ) {
351
  $input['visibility'] = array_filter(
352
+ $input['view'],
353
+ function( $v ) {
354
  return 'yes' == $v || 'no' == $v;
355
  }
356
  );
477
  } else {
478
 
479
  $value = isset( $this->settings[ $field_id ] ) ? $this->settings[ $field_id ] : '';
480
+ $utm = '?utm_source=wpadmin&utm_medium=settings&utm_campaign=v' . str_replace( '.', '_', $this->version );
481
 
482
  switch ( $field_id ) {
483
  case 'telephone':
484
  $output = '<input id="whatsappme_phone" ' . ( $this->enhanced_phone ? 'data-' : '' ) . 'name="whatsappme[telephone]" value="' . $value . '" type="text" style="width:15em">' .
485
  '<p class="description">' . __( "Contact phone number <strong>(the button will not be shown if it's empty)</strong>", 'creame-whatsapp-me' ) . '</p>' .
486
  '<p class="whatsappme-addon">' . sprintf(
487
+ __( 'Add unlimited numbers with %1$s or multiple contacts with %2$s', 'creame-whatsapp-me' ),
488
+ '<a href="https://wame.chat/en/addons/wame-random-phone/' . $utm . '" target="_blank">\'WAme Random Phone\'</a>',
489
+ '<a href="https://wame.chat/en/addons/support-agents/' . $utm . '" target="_blank">\'WAme Agents\'</a>'
490
  ) . '</p>';
491
  break;
492
 
537
  '<p class="description">' . __( 'Define a text to encourage users to contact by WhatsApp', 'creame-whatsapp-me' ) . '</p>' .
538
  '<p class="whatsappme-addon">' . sprintf(
539
  __( 'Add links, images, videos and more with %s', 'creame-whatsapp-me' ),
540
+ '<a href="https://wame.chat/en/addons/cta-extras/' . $utm . '" target="_blank">\'WAme CTA Extras\'</a>'
541
  ) . '</p>';
542
  break;
543
 
562
  __( 'Display a notification balloon instead of opening the Chat Window for a "less intrusive" mode', 'creame-whatsapp-me' ) . '</label></fieldset>';
563
  break;
564
 
565
+ case 'dark_mode':
566
+ $output = '<fieldset><legend class="screen-reader-text"><span>' . __( 'Dark Mode', 'creame-whatsapp-me' ) . '</span></legend>' .
567
+ '<label><input name="whatsappme[dark_mode]" value="no" type="radio"' . checked( 'no', $value, false ) . '> ' .
568
+ __( 'No', 'creame-whatsapp-me' ) . '</label><br>' .
569
+ '<label><input name="whatsappme[dark_mode]" value="yes" type="radio"' . checked( 'yes', $value, false ) . '> ' .
570
+ __( 'Yes', 'creame-whatsapp-me' ) . '</label><br>' .
571
+ '<label><input name="whatsappme[dark_mode]" value="auto" type="radio"' . checked( 'auto', $value, false ) . '> ' .
572
+ __( 'Auto (detects device dark mode)', 'creame-whatsapp-me' ) . '</label></fieldset>';
573
+ break;
574
+
575
  default:
576
  $output = '';
577
  break;
593
  $value = ( isset( $this->settings['visibility']['all'] ) && 'no' == $this->settings['visibility']['all'] ) ? 'no' : 'yes';
594
 
595
  $inheritance = apply_filters(
596
+ 'whatsappme_advanced_inheritance',
597
+ array(
598
  'all' => array( 'front_page', 'blog_page', '404_page', 'search', 'archive', 'singular', 'cpts' ),
599
  'archive' => array( 'date', 'author' ),
600
  'singular' => array( 'page', 'post' ),
602
  );
603
 
604
  echo '<div class="whatsappme_view_all" data-inheritance="' . esc_attr( json_encode( $inheritance ) ) . '">' .
605
+ '<label><input type="radio" name="whatsappme[view][all]" value="yes"' . checked( 'yes', $value, false ) . '> ' .
606
  '<span class="dashicons dashicons-visibility" title="' . __( 'Show', 'creame-whatsapp-me' ) . '"></span></label>' .
607
  '<label><input type="radio" name="whatsappme[view][all]" value="no"' . checked( 'no', $value, false ) . '> ' .
608
  '<span class="dashicons dashicons-hidden" title="' . __( 'Hide', 'creame-whatsapp-me' ) . '"></span></label></div>';
630
  */
631
  function help_tab() {
632
  $screen = get_current_screen();
633
+ $utm = '?utm_source=wpadmin&utm_medium=helptab&utm_campaign=v' . str_replace( '.', '_', $this->version );
634
+
635
+ $screen->add_help_tab(
636
+ array(
637
+ 'id' => 'support',
638
+ 'title' => __( 'Support and Help', 'creame-whatsapp-me' ),
639
+ 'content' =>
640
+ '<p>' . sprintf(
641
+ __(
642
+ 'If you need help, first review our <a href="%1$s" rel="external" target="_blank">documentation</a> ' .
643
+ 'and if you don\'t find a solution check the <a href="%2$s" rel="external" target="_blank">free plugin support forum</a> ' .
644
+ 'or buy our <a href="%3$s" rel="external" target="_blank">premium support</a>.',
645
+ 'creame-whatsapp-me'
646
+ ),
647
+ esc_url( 'https://wame.chat/en/docs/' . $utm ),
648
+ esc_url( 'https://wordpress.org/support/plugin/creame-whatsapp-me/' ),
649
+ esc_url( 'https://my.wame.chat/' . $utm )
650
+ ) . '</p>' .
651
+ '<p>' . __( 'If you like WAme 😍', 'creame-whatsapp-me' ) . '</p>' .
652
+ '<ul>' .
653
+ '<li>' . sprintf(
654
+ __( "Please leave us a %s rating. We'll thank you.", 'creame-whatsapp-me' ),
655
+ '<a href="https://wordpress.org/support/plugin/creame-whatsapp-me/reviews/#new-post" rel="external" target="_blank">★★★★★</a>'
656
+ ) . '</li>' .
657
+ '<li>' . sprintf(
658
+ __( 'Subscribe to our newsletter and visit our blog at %s.', 'creame-whatsapp-me' ),
659
+ '<a href="https://wame.chat/' . $utm . '" rel="external" target="_blank">wame.chat</a>'
660
+ ) . '</li>' .
661
+ '<li>' . sprintf(
662
+ __( 'Follow %s on twitter.', 'creame-whatsapp-me' ),
663
+ '<a href="https://twitter.com/wamechat" rel="external" target="_blank">@wamechat</a>'
664
+ ) . '</li>' .
665
+ '</ul>',
666
+ )
667
+ );
668
 
669
  $screen->add_help_tab(
670
  array(
683
  )
684
  );
685
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
686
  }
687
 
688
  /**
779
  * @since 2.0.0 Now can set as [show, hide, default]
780
  * @since 2.2.0 Enqueue scripts/styles. Added "telephone"
781
  * @since 3.0.3 Capture and filter output
782
+ * @since 3.2.0 Added filter 'whatsappme_metabox_placeholders'
783
  * @access public
784
  * @return void
785
  */
801
  'message_send' => '',
802
  'hide' => false,
803
  'view' => '',
804
+ ),
805
+ $metadata
806
  );
807
 
808
  // Move old 'hide' to new 'view' field
811
  }
812
  unset( $metadata['hide'] );
813
 
814
+ $placeholders = apply_filters(
815
+ 'whatsappme_metabox_placeholders',
816
+ array(
817
+ 'telephone' => $this->settings['telephone'],
818
+ 'message_text' => $this->settings['message_text'],
819
+ 'message_send' => $this->settings['message_send'],
820
+ ),
821
+ $post,
822
+ $this->settings
823
+ );
824
+
825
+ $metabox_vars = apply_filters( 'whatsappme_metabox_vars', array( 'SITE', 'URL', 'TITLE' ), $post );
826
 
827
  ob_start();
828
  ?>
830
  <?php wp_nonce_field( 'whatsappme_data', 'whatsappme_nonce' ); ?>
831
  <p>
832
  <label for="whatsappme_phone"><?php _e( 'Telephone', 'creame-whatsapp-me' ); ?></label><br>
833
+ <input id="whatsappme_phone" <?php echo $this->enhanced_phone ? 'data-' : ''; ?>name="whatsappme_telephone" value="<?php echo $metadata['telephone']; ?>" type="text" placeholder="<?php echo $placeholders['telephone']; ?>">
834
  </p>
835
  <p>
836
  <label for="whatsappme_message"><?php _e( 'Call to Action', 'creame-whatsapp-me' ); ?></label><br>
837
+ <textarea id="whatsappme_message" name="whatsappme_message" rows="2" placeholder="<?php echo $placeholders['message_text']; ?>" class="large-text"><?php echo $metadata['message_text']; ?></textarea>
838
  </p>
839
  <p>
840
  <label for="whatsappme_message_send"><?php _e( 'Message', 'creame-whatsapp-me' ); ?></label><br>
841
+ <textarea id="whatsappme_message_send" name="whatsappme_message_send" rows="2" placeholder="<?php echo $placeholders['message_send']; ?>" class="large-text"><?php echo $metadata['message_send']; ?></textarea>
842
  <?php if ( count( $metabox_vars ) ) : ?>
843
  <small><?php _e( 'You can use vars', 'creame-whatsapp-me' ); ?> <code>{<?php echo join( '}</code> <code>{', $metabox_vars ); ?>}</code></small>
844
  <?php endif; ?>
914
 
915
  }
916
 
 
917
  }
admin/class-whatsappme-wooadmin.php CHANGED
@@ -33,7 +33,8 @@ class WhatsAppMe_WooAdmin {
33
  $loader->add_filter( 'whatsappme_field_output', $this, 'field_ouput', 10, 3 );
34
  $loader->add_filter( 'whatsappme_advanced_inheritance', $this, 'advanced_inheritance' );
35
  $loader->add_filter( 'whatsappme_styles_and_vars_help', $this, 'help_vars' );
36
- $loader->add_filter( 'whatsappme_metabox_vars', $this, 'metabox_vars' );
 
37
  }
38
 
39
  /**
@@ -287,16 +288,51 @@ class WhatsAppMe_WooAdmin {
287
  * Add Product metabox variables info.
288
  *
289
  * @since 3.0.0
290
- * @param array $vars current default vars.
 
291
  * @return array
292
  */
293
- public function metabox_vars( $vars ) {
294
- global $post;
295
 
296
  if ( 'product' == $post->post_type ) {
297
- $vars = array_merge( $vars, array( 'PRODUCT', 'PRICE', 'SKU' ) );
 
 
 
 
 
 
 
 
298
  }
299
 
300
  return $vars;
301
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
  }
33
  $loader->add_filter( 'whatsappme_field_output', $this, 'field_ouput', 10, 3 );
34
  $loader->add_filter( 'whatsappme_advanced_inheritance', $this, 'advanced_inheritance' );
35
  $loader->add_filter( 'whatsappme_styles_and_vars_help', $this, 'help_vars' );
36
+ $loader->add_filter( 'whatsappme_metabox_vars', $this, 'metabox_vars', 10, 2 );
37
+ $loader->add_filter( 'whatsappme_metabox_placeholders', $this, 'metabox_placeholders', 10, 3 );
38
  }
39
 
40
  /**
288
  * Add Product metabox variables info.
289
  *
290
  * @since 3.0.0
291
+ * @param array $vars current default vars.
292
+ * @param object $post current post.
293
  * @return array
294
  */
295
+ public function metabox_vars( $vars, $post ) {
 
296
 
297
  if ( 'product' == $post->post_type ) {
298
+ $product = wc_get_product( $post->ID );
299
+ $woo_vars = array( 'PRODUCT', 'SKU', 'PRICE' );
300
+
301
+ if ( $product->is_on_sale() ) {
302
+ $woo_vars[] = 'REGULAR';
303
+ $woo_vars[] = 'DISCOUNT';
304
+ }
305
+
306
+ $vars = array_merge( $vars, $woo_vars );
307
  }
308
 
309
  return $vars;
310
  }
311
+
312
+
313
+ /**
314
+ * Add Product metabox placeholders info.
315
+ *
316
+ * @since 3.2.0
317
+ * @param array $placeholders current placeholders.
318
+ * @param object $post current post.
319
+ * @param array $settings current settings.
320
+ * @return array
321
+ */
322
+ public function metabox_placeholders( $placeholders, $post, $settings ) {
323
+
324
+ if ( 'product' == $post->post_type ) {
325
+ $product = wc_get_product( $post->ID );
326
+
327
+ $placeholders['message_send'] = $settings['message_send_product'] ?: $settings['message_send'];
328
+
329
+ if ( $product->is_on_sale() && $settings['message_text_on_sale'] ) {
330
+ $placeholders['message_text'] = $settings['message_text_on_sale'];
331
+ } else {
332
+ $placeholders['message_text'] = $settings['message_text_product'] ?: $settings['message_text'];
333
+ }
334
+ }
335
+
336
+ return $placeholders;
337
+ }
338
  }
admin/js/whatsappme.js CHANGED
@@ -12,6 +12,11 @@
12
  var country_request = JSON.parse(localStorage.whatsappme_country_code || '{}');
13
  var country_code = (country_request.code && country_request.date == new Date().toDateString()) ? country_request.code : false;
14
  var $phone = $('#whatsappme_phone');
 
 
 
 
 
15
  var iti = intlTelInput($phone.get(0), {
16
  hiddenInput: $phone.data('name') || 'whatsappme[telephone]',
17
  initialCountry: 'auto',
@@ -32,6 +37,14 @@
32
  // Ensures store current value
33
  iti.hiddenInput.value = $phone.val();
34
 
 
 
 
 
 
 
 
 
35
  $phone.on('input', function () {
36
  var $this = $(this);
37
  var iti = intlTelInputGlobals.getInstance(this);
12
  var country_request = JSON.parse(localStorage.whatsappme_country_code || '{}');
13
  var country_code = (country_request.code && country_request.date == new Date().toDateString()) ? country_request.code : false;
14
  var $phone = $('#whatsappme_phone');
15
+
16
+ // If empty value capture placeholdre and remove
17
+ var placeholder = $phone.val() === '' ? $phone.attr('placeholder') : null;
18
+ $phone.removeAttr('placeholder');
19
+
20
  var iti = intlTelInput($phone.get(0), {
21
  hiddenInput: $phone.data('name') || 'whatsappme[telephone]',
22
  initialCountry: 'auto',
37
  // Ensures store current value
38
  iti.hiddenInput.value = $phone.val();
39
 
40
+ // Post metabox if empty value set placeholder from general settings
41
+ if (typeof placeholder == 'string' && placeholder != '') {
42
+ iti.promise.then(function() {
43
+ iti.setNumber(placeholder);
44
+ $phone.attr('placeholder', iti.getNumber(intlTelInputUtils.numberFormat.NATIONAL)).val('');
45
+ });
46
+ }
47
+
48
  $phone.on('input', function () {
49
  var $this = $(this);
50
  var iti = intlTelInputGlobals.getInstance(this);
admin/js/whatsappme.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";function t(){e(this).height(0).height(this.scrollHeight)}e(function(){var a;if("function"==typeof intlTelInput&&e("#whatsappme_phone").length){var n=JSON.parse(localStorage.whatsappme_country_code||"{}"),i=!(!n.code||n.date!=(new Date).toDateString())&&n.code,s=e("#whatsappme_phone");intlTelInput(s.get(0),{hiddenInput:s.data("name")||"whatsappme[telephone]",initialCountry:"auto",preferredCountries:[i||""],geoIpLookup:function(t){i?t(i):e.getJSON("https://ipinfo.io").always(function(e){var a=e&&e.country?e.country:"";localStorage.whatsappme_country_code=JSON.stringify({code:a,date:(new Date).toDateString()}),t(a)})},utilsScript:"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/"+intl_tel_input_version+"/js/utils.js"}).hiddenInput.value=s.val(),s.on("input",function(){var t=e(this),a=intlTelInputGlobals.getInstance(this);t.css("color",t.val().trim()&&!a.isValidNumber()?"#ca4a1f":""),a.hiddenInput.value=a.getNumber()}).on("blur",function(){var e=intlTelInputGlobals.getInstance(this);e.setNumber(e.getNumber())})}if(1===e("#whatsappme_form").length){e(".nav-tab").click(function(a){a.preventDefault();var n=e(this);e(".nav-tab").removeClass("nav-tab-active").attr("aria-selected","false"),n.addClass("nav-tab-active").attr("aria-selected","true").get(0).blur(),e(".wametab").removeClass("wametab-active"),e(n.attr("href")).addClass("wametab-active").find("textarea").each(t)}),e("#whatsappme_mobile_only").change(function(){e("#whatsappme_whatsapp_web").closest("tr").toggleClass("wame-hidden",this.checked)}).change(),e("#whatsappme_message_delay").on("change input",function(){e("#whatsappme_message_badge").closest("tr").toggleClass("wame-hidden","0"==this.value)}).change(),e(".whatsappme-show-help").click(function(t){t.preventDefault();var a=e(this).attr("href");e("#contextual-help-wrap").is(":visible")?e("html, body").animate({scrollTop:0}):e("#contextual-help-link").click(),e("#"!=a?a:"#tab-link-styles-and-vars").find("a").click()}),e("textarea","#whatsappme_form").on("focus",function(){e(this).closest("tr").addClass("whatsappme--focus")}).on("blur",function(){e(this).closest("tr").removeClass("whatsappme--focus")}).on("input",t).each(t);var l=e("#whatsappme_tab_advanced"),o=e(".whatsappme_view_all").data("inheritance")||{all:["front_page","blog_page","404_page","search","archive","singular","cpts"],archive:["date","author"],singular:["page","post"]};function p(t,a){if(t=t||"all",a=a||e('input[name="whatsappme[view]['+t+']"]:checked').val(),e(".view_inheritance_"+t).toggleClass("dashicons-visibility","yes"==a).toggleClass("dashicons-hidden","no"==a),"cpts"==t)e("[class*=view_inheritance_cpt_]").toggleClass("dashicons-visibility","yes"==a).toggleClass("dashicons-hidden","no"==a);else if(t in o){var n=e('input[name="whatsappme[view]['+t+']"]:checked').val();n=""===n?a:n,e.each(o[t],function(){p(this,n)})}}e("input",l).change(function(){p()}),e(".whatsappme_view_reset").click(function(t){t.preventDefault(),e('input[value=""]',l).prop("checked",!0),e(".whatsappme_view_all input",l).first().prop("checked",!0),p()}),p(),e("#whatsappme_button_image_add").click(function(t){t.preventDefault(),a||((a=wp.media({title:e(this).data("title")||"Select button image",button:{text:e(this).data("button")||"Use Image"},library:{type:"image"},multiple:!1})).on("select",function(){var t=a.state().get("selection").first().toJSON(),n=t.sizes&&t.sizes.thumbnail&&t.sizes.thumbnail.url||t.url;e("#whatsappme_button_image_holder").css({"background-size":"cover","background-image":"url("+n+")"}),e("#whatsappme_button_image").val(t.id),e("#whatsappme_button_image_remove").removeClass("wame-hidden")}),a.on("open",function(){var t=wp.media.attachment(e("#whatsappme_button_image").val());a.state().get("selection").add(t?[t]:[])})),a.open()}),e("#whatsappme_button_image_remove").click(function(t){t.preventDefault(),e("#whatsappme_button_image_holder").removeAttr("style"),e("#whatsappme_button_image").val(""),e(this).addClass("wame-hidden")})}1===e(".whatsappme-metabox").length&&e("textarea",".whatsappme-metabox").on("focus input",t).each(t)})}(jQuery);
1
+ !function(e){"use strict";function t(){e(this).height(0).height(this.scrollHeight)}e(function(){var a;if("function"==typeof intlTelInput&&e("#whatsappme_phone").length){var n=JSON.parse(localStorage.whatsappme_country_code||"{}"),i=!(!n.code||n.date!=(new Date).toDateString())&&n.code,s=e("#whatsappme_phone"),l=""===s.val()?s.attr("placeholder"):null;s.removeAttr("placeholder");var o=intlTelInput(s.get(0),{hiddenInput:s.data("name")||"whatsappme[telephone]",initialCountry:"auto",preferredCountries:[i||""],geoIpLookup:function(t){i?t(i):e.getJSON("https://ipinfo.io").always(function(e){var a=e&&e.country?e.country:"";localStorage.whatsappme_country_code=JSON.stringify({code:a,date:(new Date).toDateString()}),t(a)})},utilsScript:"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/"+intl_tel_input_version+"/js/utils.js"});o.hiddenInput.value=s.val(),"string"==typeof l&&""!=l&&o.promise.then(function(){o.setNumber(l),s.attr("placeholder",o.getNumber(intlTelInputUtils.numberFormat.NATIONAL)).val("")}),s.on("input",function(){var t=e(this),a=intlTelInputGlobals.getInstance(this);t.css("color",t.val().trim()&&!a.isValidNumber()?"#ca4a1f":""),a.hiddenInput.value=a.getNumber()}).on("blur",function(){var e=intlTelInputGlobals.getInstance(this);e.setNumber(e.getNumber())})}if(1===e("#whatsappme_form").length){e(".nav-tab").click(function(a){a.preventDefault();var n=e(this);e(".nav-tab").removeClass("nav-tab-active").attr("aria-selected","false"),n.addClass("nav-tab-active").attr("aria-selected","true").get(0).blur(),e(".wametab").removeClass("wametab-active"),e(n.attr("href")).addClass("wametab-active").find("textarea").each(t)}),e("#whatsappme_mobile_only").change(function(){e("#whatsappme_whatsapp_web").closest("tr").toggleClass("wame-hidden",this.checked)}).change(),e("#whatsappme_message_delay").on("change input",function(){e("#whatsappme_message_badge").closest("tr").toggleClass("wame-hidden","0"==this.value)}).change(),e(".whatsappme-show-help").click(function(t){t.preventDefault();var a=e(this).attr("href");e("#contextual-help-wrap").is(":visible")?e("html, body").animate({scrollTop:0}):e("#contextual-help-link").click(),e("#"!=a?a:"#tab-link-styles-and-vars").find("a").click()}),e("textarea","#whatsappme_form").on("focus",function(){e(this).closest("tr").addClass("whatsappme--focus")}).on("blur",function(){e(this).closest("tr").removeClass("whatsappme--focus")}).on("input",t).each(t);var p=e("#whatsappme_tab_advanced"),c=e(".whatsappme_view_all").data("inheritance")||{all:["front_page","blog_page","404_page","search","archive","singular","cpts"],archive:["date","author"],singular:["page","post"]};function r(t,a){if(t=t||"all",a=a||e('input[name="whatsappme[view]['+t+']"]:checked').val(),e(".view_inheritance_"+t).toggleClass("dashicons-visibility","yes"==a).toggleClass("dashicons-hidden","no"==a),"cpts"==t)e("[class*=view_inheritance_cpt_]").toggleClass("dashicons-visibility","yes"==a).toggleClass("dashicons-hidden","no"==a);else if(t in c){var n=e('input[name="whatsappme[view]['+t+']"]:checked').val();n=""===n?a:n,e.each(c[t],function(){r(this,n)})}}e("input",p).change(function(){r()}),e(".whatsappme_view_reset").click(function(t){t.preventDefault(),e('input[value=""]',p).prop("checked",!0),e(".whatsappme_view_all input",p).first().prop("checked",!0),r()}),r(),e("#whatsappme_button_image_add").click(function(t){t.preventDefault(),a||((a=wp.media({title:e(this).data("title")||"Select button image",button:{text:e(this).data("button")||"Use Image"},library:{type:"image"},multiple:!1})).on("select",function(){var t=a.state().get("selection").first().toJSON(),n=t.sizes&&t.sizes.thumbnail&&t.sizes.thumbnail.url||t.url;e("#whatsappme_button_image_holder").css({"background-size":"cover","background-image":"url("+n+")"}),e("#whatsappme_button_image").val(t.id),e("#whatsappme_button_image_remove").removeClass("wame-hidden")}),a.on("open",function(){var t=wp.media.attachment(e("#whatsappme_button_image").val());a.state().get("selection").add(t?[t]:[])})),a.open()}),e("#whatsappme_button_image_remove").click(function(t){t.preventDefault(),e("#whatsappme_button_image_holder").removeAttr("style"),e("#whatsappme_button_image").val(""),e(this).addClass("wame-hidden")})}1===e(".whatsappme-metabox").length&&e("textarea",".whatsappme-metabox").on("focus input",t).each(t)})}(jQuery);
includes/class-whatsappme-util.php CHANGED
@@ -25,7 +25,8 @@ class WhatsAppMe_Util {
25
  public static function settings_i18n() {
26
 
27
  return apply_filters(
28
- 'whatsappme_settings_i18n', array(
 
29
  'button_tip' => 'Tooltip',
30
  'message_text' => 'Call to Action',
31
  'message_send' => 'Message',
@@ -143,14 +144,18 @@ class WhatsAppMe_Util {
143
  public static function formated_message( $string ) {
144
 
145
  $replacements = apply_filters(
146
- 'whatsappme_format_replacements', array(
 
147
  '/_(\S[^_]*\S)_/u' => '<em>$1</em>',
148
  '/\*(\S[^\*]*\S)\*/u' => '<strong>$1</strong>',
149
  '/~(\S[^~]*\S)~/u' => '<del>$1</del>',
150
  )
151
  );
152
 
153
- $replacements = apply_filters_deprecated( 'whatsappme_message_replacements', array( $replacements ), '3.0.3', 'whatsappme_format_replacements' );
 
 
 
154
 
155
  // Split text into lines and apply replacements line by line
156
  $lines = explode( "\n", $string );
@@ -183,7 +188,8 @@ class WhatsAppMe_Util {
183
  global $wp;
184
 
185
  $replacements = apply_filters(
186
- 'whatsappme_variable_replacements', array(
 
187
  'SITE' => get_bloginfo( 'name' ),
188
  'URL' => home_url( $wp->request ),
189
  'TITLE' => self::get_title(),
@@ -194,10 +200,14 @@ class WhatsAppMe_Util {
194
  $patterns = array_map(
195
  function ( $var ) {
196
  return "/\{$var\}/u";
197
- }, array_keys( $replacements )
 
198
  );
199
 
200
- $replacements = apply_filters_deprecated( 'whatsappme_message_send_replacements', array( array_combine( $patterns, $replacements ) ), '3.0.3', 'whatsappme_variable_replacements' );
 
 
 
201
 
202
  return preg_replace( array_keys( $replacements ), $replacements, $string );
203
 
25
  public static function settings_i18n() {
26
 
27
  return apply_filters(
28
+ 'whatsappme_settings_i18n',
29
+ array(
30
  'button_tip' => 'Tooltip',
31
  'message_text' => 'Call to Action',
32
  'message_send' => 'Message',
144
  public static function formated_message( $string ) {
145
 
146
  $replacements = apply_filters(
147
+ 'whatsappme_format_replacements',
148
+ array(
149
  '/_(\S[^_]*\S)_/u' => '<em>$1</em>',
150
  '/\*(\S[^\*]*\S)\*/u' => '<strong>$1</strong>',
151
  '/~(\S[^~]*\S)~/u' => '<del>$1</del>',
152
  )
153
  );
154
 
155
+ // Since WP 4.6
156
+ if ( function_exists( 'apply_filters_deprecated' ) ) {
157
+ $replacements = apply_filters_deprecated( 'whatsappme_message_replacements', array( $replacements ), '3.0.3', 'whatsappme_format_replacements' );
158
+ }
159
 
160
  // Split text into lines and apply replacements line by line
161
  $lines = explode( "\n", $string );
188
  global $wp;
189
 
190
  $replacements = apply_filters(
191
+ 'whatsappme_variable_replacements',
192
+ array(
193
  'SITE' => get_bloginfo( 'name' ),
194
  'URL' => home_url( $wp->request ),
195
  'TITLE' => self::get_title(),
200
  $patterns = array_map(
201
  function ( $var ) {
202
  return "/\{$var\}/u";
203
+ },
204
+ array_keys( $replacements )
205
  );
206
 
207
+ // Since WP 4.6
208
+ if ( function_exists( 'apply_filters_deprecated' ) ) {
209
+ $replacements = apply_filters_deprecated( 'whatsappme_message_send_replacements', array( array_combine( $patterns, $replacements ) ), '3.0.3', 'whatsappme_variable_replacements' );
210
+ }
211
 
212
  return preg_replace( array_keys( $replacements ), $replacements, $string );
213
 
includes/class-whatsappme.php CHANGED
@@ -60,6 +60,7 @@ class WhatsAppMe {
60
  $this->load_dependencies();
61
  $this->set_locale();
62
  $this->load_integrations();
 
63
  is_admin() ? $this->define_admin_hooks() : $this->define_public_hooks();
64
 
65
  }
60
  $this->load_dependencies();
61
  $this->set_locale();
62
  $this->load_integrations();
63
+
64
  is_admin() ? $this->define_admin_hooks() : $this->define_public_hooks();
65
 
66
  }
languages/creame-whatsapp-me.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: WAme chat\n"
5
- "POT-Creation-Date: 2019-11-13 16:52+0100\n"
6
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
7
  "Last-Translator: Your Name <you@example.com>\n"
8
  "Language-Team: Creame <hola@crea.me>\n"
@@ -21,434 +21,453 @@ msgstr ""
21
  "X-Generator: Poedit 1.8.7.1\n"
22
  "X-Poedit-SearchPath-0: .\n"
23
 
24
- #: admin/class-whatsappme-admin.php:98
25
  msgid "General"
26
  msgstr ""
27
 
28
- #: admin/class-whatsappme-admin.php:99
29
  msgid "Advanced"
30
  msgstr ""
31
 
32
- #: admin/class-whatsappme-admin.php:116 admin/class-whatsappme-admin.php:543
33
  #: public/class-whatsappme-public.php:102
34
  msgid "Open chat"
35
  msgstr ""
36
 
37
- #: admin/class-whatsappme-admin.php:238 admin/class-whatsappme-admin.php:792
38
  msgid "Telephone"
39
  msgstr ""
40
 
41
- #: admin/class-whatsappme-admin.php:239 admin/class-whatsappme-admin.php:800
42
  msgid "Message"
43
  msgstr ""
44
 
45
- #: admin/class-whatsappme-admin.php:240 admin/class-whatsappme-admin.php:487
46
  msgid "Mobile Only"
47
  msgstr ""
48
 
49
- #: admin/class-whatsappme-admin.php:241 admin/class-whatsappme-admin.php:493
50
  msgid "Position on Screen"
51
  msgstr ""
52
 
53
- #: admin/class-whatsappme-admin.php:242
54
  msgid "Image"
55
  msgstr ""
56
 
57
- #: admin/class-whatsappme-admin.php:243
58
  msgid "Tooltip"
59
  msgstr ""
60
 
61
- #: admin/class-whatsappme-admin.php:244
62
  msgid "Button Delay"
63
  msgstr ""
64
 
65
- #: admin/class-whatsappme-admin.php:245 admin/class-whatsappme-admin.php:523
66
  msgid "WhatsApp Web"
67
  msgstr ""
68
 
69
- #: admin/class-whatsappme-admin.php:248 admin/class-whatsappme-admin.php:796
70
  msgid "Call to Action"
71
  msgstr ""
72
 
73
- #: admin/class-whatsappme-admin.php:249
74
  msgid "Start WhatsApp Button"
75
  msgstr ""
76
 
77
- #: admin/class-whatsappme-admin.php:250
78
  msgid "Chat Delay"
79
  msgstr ""
80
 
81
- #: admin/class-whatsappme-admin.php:251 admin/class-whatsappme-admin.php:553
82
  msgid "Notification Balloon"
83
  msgstr ""
84
 
85
- #: admin/class-whatsappme-admin.php:260
 
 
 
 
86
  msgid "Global"
87
  msgstr ""
88
 
89
- #: admin/class-whatsappme-admin.php:265
90
  msgid "Front Page"
91
  msgstr ""
92
 
93
- #: admin/class-whatsappme-admin.php:266
94
  msgid "Blog Page"
95
  msgstr ""
96
 
97
- #: admin/class-whatsappme-admin.php:267
98
  msgid "404 Page"
99
  msgstr ""
100
 
101
- #: admin/class-whatsappme-admin.php:268
102
  msgid "Search Results"
103
  msgstr ""
104
 
105
- #: admin/class-whatsappme-admin.php:269
106
  msgid "Archives"
107
  msgstr ""
108
 
109
- #: admin/class-whatsappme-admin.php:270
110
  msgid "Date Archives"
111
  msgstr ""
112
 
113
- #: admin/class-whatsappme-admin.php:271
114
  msgid "Author Archives"
115
  msgstr ""
116
 
117
- #: admin/class-whatsappme-admin.php:272
118
  msgid "Singular"
119
  msgstr ""
120
 
121
- #: admin/class-whatsappme-admin.php:273
122
  msgid "Page"
123
  msgstr ""
124
 
125
- #: admin/class-whatsappme-admin.php:274
126
  msgid "Post"
127
  msgstr ""
128
 
129
- #: admin/class-whatsappme-admin.php:371
130
  msgid "Settings saved"
131
  msgstr ""
132
 
133
- #: admin/class-whatsappme-admin.php:417
134
  msgid "Button"
135
  msgstr ""
136
 
137
- #: admin/class-whatsappme-admin.php:418
138
  msgid ""
139
  "Set the contact number and where you want the WhatsApp button to be "
140
  "displayed."
141
  msgstr ""
142
 
143
- #: admin/class-whatsappme-admin.php:422
144
  msgid "Chat Window"
145
  msgstr ""
146
 
147
- #: admin/class-whatsappme-admin.php:424
148
  msgid ""
149
  "If you define a \"Call to Action\" a window will be displayed simulating a "
150
  "chat before launching WhatsApp."
151
  msgstr ""
152
 
153
- #: admin/class-whatsappme-admin.php:425
154
  msgid ""
155
  "You can introduce yourself, offer help or even make promotions to your "
156
  "users."
157
  msgstr ""
158
 
159
- #: admin/class-whatsappme-admin.php:430
160
  msgid "Advanced Visibility Settings"
161
  msgstr ""
162
 
163
- #: admin/class-whatsappme-admin.php:431
164
  msgid ""
165
  "From here you can configure on which pages the WhatsApp button will be "
166
  "visible."
167
  msgstr ""
168
 
169
- #: admin/class-whatsappme-admin.php:432
170
  msgid "Restore default visibility"
171
  msgstr ""
172
 
173
- #: admin/class-whatsappme-admin.php:440
174
  msgid "Custom Post Types"
175
  msgstr ""
176
 
177
- #: admin/class-whatsappme-admin.php:466 admin/class-whatsappme-admin.php:588
178
- #: admin/class-whatsappme-admin.php:808
179
  msgid "Show"
180
  msgstr ""
181
 
182
- #: admin/class-whatsappme-admin.php:468 admin/class-whatsappme-admin.php:590
183
- #: admin/class-whatsappme-admin.php:810
184
  msgid "Hide"
185
  msgstr ""
186
 
187
- #: admin/class-whatsappme-admin.php:470
188
  msgid "Inherit"
189
  msgstr ""
190
 
191
- #: admin/class-whatsappme-admin.php:479
192
  msgid ""
193
  "Contact phone number <strong>(the button will not be shown if it's empty)</"
194
  "strong>"
195
  msgstr ""
196
 
197
- #: admin/class-whatsappme-admin.php:481
198
  #, php-format
199
- msgid "Add unlimited numbers with %s"
200
  msgstr ""
201
 
202
- #: admin/class-whatsappme-admin.php:489
203
  msgid "Only display the button on mobile devices"
204
  msgstr ""
205
 
206
- #: admin/class-whatsappme-admin.php:495
207
  msgid "Left"
208
  msgstr ""
209
 
210
- #: admin/class-whatsappme-admin.php:497
211
  msgid "Right"
212
  msgstr ""
213
 
214
- #: admin/class-whatsappme-admin.php:506
215
  msgid "Select an image"
216
  msgstr ""
217
 
218
- #: admin/class-whatsappme-admin.php:507
219
  msgid "Select button image"
220
  msgstr ""
221
 
222
- #: admin/class-whatsappme-admin.php:507
223
  msgid "Use image"
224
  msgstr ""
225
 
226
- #: admin/class-whatsappme-admin.php:508
227
  msgid "Remove"
228
  msgstr ""
229
 
230
- #: admin/class-whatsappme-admin.php:509
231
  msgid "The image will alternate with WhatsApp logo"
232
  msgstr ""
233
 
234
- #: admin/class-whatsappme-admin.php:513
235
  msgid "💬 Need help?"
236
  msgstr ""
237
 
238
- #: admin/class-whatsappme-admin.php:514
239
  msgid "Short text shown next to WhatsApp button"
240
  msgstr ""
241
 
242
- #: admin/class-whatsappme-admin.php:518
243
  msgid "seconds"
244
  msgstr ""
245
 
246
- #: admin/class-whatsappme-admin.php:519
247
  msgid "Time since the page is opened until the WhatsApp button is displayed"
248
  msgstr ""
249
 
250
- #: admin/class-whatsappme-admin.php:525
251
  msgid "Open <em>WhatsApp Web</em> directly on desktop"
252
  msgstr ""
253
 
254
- #: admin/class-whatsappme-admin.php:529
255
  msgid ""
256
  "Hello 👋\n"
257
  "Can we help you?"
258
  msgstr ""
259
 
260
- #: admin/class-whatsappme-admin.php:530
261
  msgid "Define a text to encourage users to contact by WhatsApp"
262
  msgstr ""
263
 
264
- #: admin/class-whatsappme-admin.php:532
265
  #, php-format
266
  msgid "Add links, images, videos and more with %s"
267
  msgstr ""
268
 
269
- #: admin/class-whatsappme-admin.php:538
270
  msgid "Hi *{SITE}*! I need more info about {TITLE} {URL}"
271
  msgstr ""
272
 
273
- #: admin/class-whatsappme-admin.php:539
274
  msgid "Predefined text for the first message the user will send you"
275
  msgstr ""
276
 
277
- #: admin/class-whatsappme-admin.php:544
278
  msgid "Text of the start WhatsApp button on Chat Window"
279
  msgstr ""
280
 
281
- #: admin/class-whatsappme-admin.php:548
282
  msgid "seconds (0 disabled)"
283
  msgstr ""
284
 
285
- #: admin/class-whatsappme-admin.php:549
286
  msgid "Chat Window is automatically displayed after delay"
287
  msgstr ""
288
 
289
- #: admin/class-whatsappme-admin.php:555
290
  msgid ""
291
  "Display a notification balloon instead of opening the Chat Window for a "
292
  "\"less intrusive\" mode"
293
  msgstr ""
294
 
295
- #: admin/class-whatsappme-admin.php:619
296
- msgid "Styles and Variables"
297
  msgstr ""
298
 
299
- #: admin/class-whatsappme-admin.php:622
300
- msgid ""
301
- "You can use formatting styles like in WhatsApp: _<em>italic</em>_ "
302
- "*<strong>bold</strong>* ~<del>strikethrough</del>~."
303
- msgstr ""
304
-
305
- #: admin/class-whatsappme-admin.php:623
306
- msgid ""
307
- "You can use dynamic variables that will be replaced by the values of the "
308
- "page the user visits:"
309
  msgstr ""
310
 
311
- #: admin/class-whatsappme-admin.php:627
312
- msgid "Page Title"
313
  msgstr ""
314
 
315
- #: admin/class-whatsappme-admin.php:636
316
  msgid "Support and Help"
317
  msgstr ""
318
 
319
- #: admin/class-whatsappme-admin.php:639
320
  #, php-format
321
  msgid ""
322
- "If you need help, please check the <a href=\"%s\" rel=\"external\" target="
323
- "\"_blank\">plugin support forum</a>."
 
 
 
324
  msgstr ""
325
 
326
- #: admin/class-whatsappme-admin.php:642
327
  msgid "If you like WAme 😍"
328
  msgstr ""
329
 
330
- #: admin/class-whatsappme-admin.php:645
331
  #, php-format
332
- msgid "Subscribe to our newsletter and our blog at %s."
333
  msgstr ""
334
 
335
- #: admin/class-whatsappme-admin.php:649
336
  #, php-format
337
- msgid "Learn from our tutorials on %s."
338
  msgstr ""
339
 
340
- #: admin/class-whatsappme-admin.php:653
341
  #, php-format
342
- msgid "Or rate us on %s."
 
 
 
 
 
 
 
 
 
 
343
  msgstr ""
344
 
345
- #: admin/class-whatsappme-admin.php:670
 
 
 
 
 
 
 
 
 
 
346
  msgid "Settings"
347
  msgstr ""
348
 
349
- #: admin/class-whatsappme-admin.php:739
350
  msgid "WAme chat"
351
  msgstr ""
352
 
353
- #: admin/class-whatsappme-admin.php:803 admin/class-whatsappme-admin.php:871
354
  msgid "You can use vars"
355
  msgstr ""
356
 
357
- #: admin/class-whatsappme-admin.php:812
358
  msgid "Default visibility"
359
  msgstr ""
360
 
361
- #: admin/class-whatsappme-admin.php:872
362
  msgid "Show Help"
363
  msgstr ""
364
 
365
- #: admin/class-whatsappme-wooadmin.php:127
366
  msgid "Shop"
367
  msgstr ""
368
 
369
- #: admin/class-whatsappme-wooadmin.php:128
370
  msgid "Product Page"
371
  msgstr ""
372
 
373
- #: admin/class-whatsappme-wooadmin.php:129
374
  msgid "Cart"
375
  msgstr ""
376
 
377
- #: admin/class-whatsappme-wooadmin.php:130
378
  msgid "Checkout"
379
  msgstr ""
380
 
381
- #: admin/class-whatsappme-wooadmin.php:131
382
  msgid "My Account"
383
  msgstr ""
384
 
385
- #: admin/class-whatsappme-wooadmin.php:147
386
  msgid "Call to Action for Products"
387
  msgstr ""
388
 
389
- #: admin/class-whatsappme-wooadmin.php:148
390
  msgid "Call to Action for Products on Sale"
391
  msgstr ""
392
 
393
- #: admin/class-whatsappme-wooadmin.php:149
394
  msgid "Message for Products"
395
  msgstr ""
396
 
397
- #: admin/class-whatsappme-wooadmin.php:191
398
  msgid "WooCommerce"
399
  msgstr ""
400
 
401
- #: admin/class-whatsappme-wooadmin.php:195
402
  msgid "Product Chat Window"
403
  msgstr ""
404
 
405
- #: admin/class-whatsappme-wooadmin.php:197
406
  msgid ""
407
  "You can define other different texts for the Chat Window on the product "
408
  "pages."
409
  msgstr ""
410
 
411
- #: admin/class-whatsappme-wooadmin.php:221
412
  msgid ""
413
  "This *{PRODUCT}* can be yours for only *{PRICE}*!\n"
414
  "If you have any questions, ask us."
415
  msgstr ""
416
 
417
- #: admin/class-whatsappme-wooadmin.php:223
418
  msgid "Define a text for your products to encourage customers to contact"
419
  msgstr ""
420
 
421
- #: admin/class-whatsappme-wooadmin.php:228
422
  msgid ""
423
  "Save {DISCOUNT}! This *{PRODUCT}* can be yours for only ~{REGULAR}~ "
424
  "*{PRICE}*.\n"
425
  "If you have any questions, ask us."
426
  msgstr ""
427
 
428
- #: admin/class-whatsappme-wooadmin.php:230
429
  msgid ""
430
  "Define a text for your products on sale to encourage customers to contact"
431
  msgstr ""
432
 
433
- #: admin/class-whatsappme-wooadmin.php:235
434
  msgid ""
435
  "*Hi {SITE}!*\n"
436
  "I have a question about *{PRODUCT} ({SKU})*"
437
  msgstr ""
438
 
439
- #: admin/class-whatsappme-wooadmin.php:236
440
  msgid "Predefined text for the first message the client will send you"
441
  msgstr ""
442
 
443
- #: admin/class-whatsappme-wooadmin.php:271
444
  msgid "<strong>WooCommerce</strong>, in product pages you can also use:"
445
  msgstr ""
446
 
447
- #: admin/class-whatsappme-wooadmin.php:273
448
  msgid "Product Name"
449
  msgstr ""
450
 
451
- #: admin/class-whatsappme-wooadmin.php:277
452
  msgid ""
453
  "For the <strong>Call to Action for Products on Sale</strong>, you can also "
454
  "use:"
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: WAme chat\n"
5
+ "POT-Creation-Date: 2020-01-29 15:20+0100\n"
6
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
7
  "Last-Translator: Your Name <you@example.com>\n"
8
  "Language-Team: Creame <hola@crea.me>\n"
21
  "X-Generator: Poedit 1.8.7.1\n"
22
  "X-Poedit-SearchPath-0: .\n"
23
 
24
+ #: admin/class-whatsappme-admin.php:99
25
  msgid "General"
26
  msgstr ""
27
 
28
+ #: admin/class-whatsappme-admin.php:100
29
  msgid "Advanced"
30
  msgstr ""
31
 
32
+ #: admin/class-whatsappme-admin.php:117 admin/class-whatsappme-admin.php:550
33
  #: public/class-whatsappme-public.php:102
34
  msgid "Open chat"
35
  msgstr ""
36
 
37
+ #: admin/class-whatsappme-admin.php:240 admin/class-whatsappme-admin.php:831
38
  msgid "Telephone"
39
  msgstr ""
40
 
41
+ #: admin/class-whatsappme-admin.php:241 admin/class-whatsappme-admin.php:839
42
  msgid "Message"
43
  msgstr ""
44
 
45
+ #: admin/class-whatsappme-admin.php:242 admin/class-whatsappme-admin.php:494
46
  msgid "Mobile Only"
47
  msgstr ""
48
 
49
+ #: admin/class-whatsappme-admin.php:243 admin/class-whatsappme-admin.php:500
50
  msgid "Position on Screen"
51
  msgstr ""
52
 
53
+ #: admin/class-whatsappme-admin.php:244
54
  msgid "Image"
55
  msgstr ""
56
 
57
+ #: admin/class-whatsappme-admin.php:245
58
  msgid "Tooltip"
59
  msgstr ""
60
 
61
+ #: admin/class-whatsappme-admin.php:246
62
  msgid "Button Delay"
63
  msgstr ""
64
 
65
+ #: admin/class-whatsappme-admin.php:247 admin/class-whatsappme-admin.php:530
66
  msgid "WhatsApp Web"
67
  msgstr ""
68
 
69
+ #: admin/class-whatsappme-admin.php:250 admin/class-whatsappme-admin.php:835
70
  msgid "Call to Action"
71
  msgstr ""
72
 
73
+ #: admin/class-whatsappme-admin.php:251
74
  msgid "Start WhatsApp Button"
75
  msgstr ""
76
 
77
+ #: admin/class-whatsappme-admin.php:252
78
  msgid "Chat Delay"
79
  msgstr ""
80
 
81
+ #: admin/class-whatsappme-admin.php:253 admin/class-whatsappme-admin.php:560
82
  msgid "Notification Balloon"
83
  msgstr ""
84
 
85
+ #: admin/class-whatsappme-admin.php:254 admin/class-whatsappme-admin.php:566
86
+ msgid "Dark Mode"
87
+ msgstr ""
88
+
89
+ #: admin/class-whatsappme-admin.php:263
90
  msgid "Global"
91
  msgstr ""
92
 
93
+ #: admin/class-whatsappme-admin.php:268
94
  msgid "Front Page"
95
  msgstr ""
96
 
97
+ #: admin/class-whatsappme-admin.php:269
98
  msgid "Blog Page"
99
  msgstr ""
100
 
101
+ #: admin/class-whatsappme-admin.php:270
102
  msgid "404 Page"
103
  msgstr ""
104
 
105
+ #: admin/class-whatsappme-admin.php:271
106
  msgid "Search Results"
107
  msgstr ""
108
 
109
+ #: admin/class-whatsappme-admin.php:272
110
  msgid "Archives"
111
  msgstr ""
112
 
113
+ #: admin/class-whatsappme-admin.php:273
114
  msgid "Date Archives"
115
  msgstr ""
116
 
117
+ #: admin/class-whatsappme-admin.php:274
118
  msgid "Author Archives"
119
  msgstr ""
120
 
121
+ #: admin/class-whatsappme-admin.php:275
122
  msgid "Singular"
123
  msgstr ""
124
 
125
+ #: admin/class-whatsappme-admin.php:276
126
  msgid "Page"
127
  msgstr ""
128
 
129
+ #: admin/class-whatsappme-admin.php:277
130
  msgid "Post"
131
  msgstr ""
132
 
133
+ #: admin/class-whatsappme-admin.php:376
134
  msgid "Settings saved"
135
  msgstr ""
136
 
137
+ #: admin/class-whatsappme-admin.php:422
138
  msgid "Button"
139
  msgstr ""
140
 
141
+ #: admin/class-whatsappme-admin.php:423
142
  msgid ""
143
  "Set the contact number and where you want the WhatsApp button to be "
144
  "displayed."
145
  msgstr ""
146
 
147
+ #: admin/class-whatsappme-admin.php:427
148
  msgid "Chat Window"
149
  msgstr ""
150
 
151
+ #: admin/class-whatsappme-admin.php:429
152
  msgid ""
153
  "If you define a \"Call to Action\" a window will be displayed simulating a "
154
  "chat before launching WhatsApp."
155
  msgstr ""
156
 
157
+ #: admin/class-whatsappme-admin.php:430
158
  msgid ""
159
  "You can introduce yourself, offer help or even make promotions to your "
160
  "users."
161
  msgstr ""
162
 
163
+ #: admin/class-whatsappme-admin.php:435
164
  msgid "Advanced Visibility Settings"
165
  msgstr ""
166
 
167
+ #: admin/class-whatsappme-admin.php:436
168
  msgid ""
169
  "From here you can configure on which pages the WhatsApp button will be "
170
  "visible."
171
  msgstr ""
172
 
173
+ #: admin/class-whatsappme-admin.php:437
174
  msgid "Restore default visibility"
175
  msgstr ""
176
 
177
+ #: admin/class-whatsappme-admin.php:445
178
  msgid "Custom Post Types"
179
  msgstr ""
180
 
181
+ #: admin/class-whatsappme-admin.php:471 admin/class-whatsappme-admin.php:606
182
+ #: admin/class-whatsappme-admin.php:847
183
  msgid "Show"
184
  msgstr ""
185
 
186
+ #: admin/class-whatsappme-admin.php:473 admin/class-whatsappme-admin.php:608
187
+ #: admin/class-whatsappme-admin.php:849
188
  msgid "Hide"
189
  msgstr ""
190
 
191
+ #: admin/class-whatsappme-admin.php:475
192
  msgid "Inherit"
193
  msgstr ""
194
 
195
+ #: admin/class-whatsappme-admin.php:485
196
  msgid ""
197
  "Contact phone number <strong>(the button will not be shown if it's empty)</"
198
  "strong>"
199
  msgstr ""
200
 
201
+ #: admin/class-whatsappme-admin.php:487
202
  #, php-format
203
+ msgid "Add unlimited numbers with %1$s or multiple contacts with %2$s"
204
  msgstr ""
205
 
206
+ #: admin/class-whatsappme-admin.php:496
207
  msgid "Only display the button on mobile devices"
208
  msgstr ""
209
 
210
+ #: admin/class-whatsappme-admin.php:502
211
  msgid "Left"
212
  msgstr ""
213
 
214
+ #: admin/class-whatsappme-admin.php:504
215
  msgid "Right"
216
  msgstr ""
217
 
218
+ #: admin/class-whatsappme-admin.php:513
219
  msgid "Select an image"
220
  msgstr ""
221
 
222
+ #: admin/class-whatsappme-admin.php:514
223
  msgid "Select button image"
224
  msgstr ""
225
 
226
+ #: admin/class-whatsappme-admin.php:514
227
  msgid "Use image"
228
  msgstr ""
229
 
230
+ #: admin/class-whatsappme-admin.php:515
231
  msgid "Remove"
232
  msgstr ""
233
 
234
+ #: admin/class-whatsappme-admin.php:516
235
  msgid "The image will alternate with WhatsApp logo"
236
  msgstr ""
237
 
238
+ #: admin/class-whatsappme-admin.php:520
239
  msgid "💬 Need help?"
240
  msgstr ""
241
 
242
+ #: admin/class-whatsappme-admin.php:521
243
  msgid "Short text shown next to WhatsApp button"
244
  msgstr ""
245
 
246
+ #: admin/class-whatsappme-admin.php:525
247
  msgid "seconds"
248
  msgstr ""
249
 
250
+ #: admin/class-whatsappme-admin.php:526
251
  msgid "Time since the page is opened until the WhatsApp button is displayed"
252
  msgstr ""
253
 
254
+ #: admin/class-whatsappme-admin.php:532
255
  msgid "Open <em>WhatsApp Web</em> directly on desktop"
256
  msgstr ""
257
 
258
+ #: admin/class-whatsappme-admin.php:536
259
  msgid ""
260
  "Hello 👋\n"
261
  "Can we help you?"
262
  msgstr ""
263
 
264
+ #: admin/class-whatsappme-admin.php:537
265
  msgid "Define a text to encourage users to contact by WhatsApp"
266
  msgstr ""
267
 
268
+ #: admin/class-whatsappme-admin.php:539
269
  #, php-format
270
  msgid "Add links, images, videos and more with %s"
271
  msgstr ""
272
 
273
+ #: admin/class-whatsappme-admin.php:545
274
  msgid "Hi *{SITE}*! I need more info about {TITLE} {URL}"
275
  msgstr ""
276
 
277
+ #: admin/class-whatsappme-admin.php:546
278
  msgid "Predefined text for the first message the user will send you"
279
  msgstr ""
280
 
281
+ #: admin/class-whatsappme-admin.php:551
282
  msgid "Text of the start WhatsApp button on Chat Window"
283
  msgstr ""
284
 
285
+ #: admin/class-whatsappme-admin.php:555
286
  msgid "seconds (0 disabled)"
287
  msgstr ""
288
 
289
+ #: admin/class-whatsappme-admin.php:556
290
  msgid "Chat Window is automatically displayed after delay"
291
  msgstr ""
292
 
293
+ #: admin/class-whatsappme-admin.php:562
294
  msgid ""
295
  "Display a notification balloon instead of opening the Chat Window for a "
296
  "\"less intrusive\" mode"
297
  msgstr ""
298
 
299
+ #: admin/class-whatsappme-admin.php:568
300
+ msgid "No"
301
  msgstr ""
302
 
303
+ #: admin/class-whatsappme-admin.php:570
304
+ msgid "Yes"
 
 
 
 
 
 
 
 
305
  msgstr ""
306
 
307
+ #: admin/class-whatsappme-admin.php:572
308
+ msgid "Auto (detects device dark mode)"
309
  msgstr ""
310
 
311
+ #: admin/class-whatsappme-admin.php:638
312
  msgid "Support and Help"
313
  msgstr ""
314
 
315
+ #: admin/class-whatsappme-admin.php:642
316
  #, php-format
317
  msgid ""
318
+ "If you need help, first review our <a href=\"%1$s\" rel=\"external\" "
319
+ "target=\"_blank\">documentation</a> and if you don't find a solution check "
320
+ "the <a href=\"%2$s\" rel=\"external\" target=\"_blank\">free plugin "
321
+ "support forum</a> or buy our <a href=\"%3$s\" rel=\"external\" target="
322
+ "\"_blank\">premium support</a>."
323
  msgstr ""
324
 
325
+ #: admin/class-whatsappme-admin.php:651
326
  msgid "If you like WAme 😍"
327
  msgstr ""
328
 
329
+ #: admin/class-whatsappme-admin.php:654
330
  #, php-format
331
+ msgid "Please leave us a %s rating. We'll thank you."
332
  msgstr ""
333
 
334
+ #: admin/class-whatsappme-admin.php:658
335
  #, php-format
336
+ msgid "Subscribe to our newsletter and visit our blog at %s."
337
  msgstr ""
338
 
339
+ #: admin/class-whatsappme-admin.php:662
340
  #, php-format
341
+ msgid "Follow %s on twitter."
342
+ msgstr ""
343
+
344
+ #: admin/class-whatsappme-admin.php:672
345
+ msgid "Styles and Variables"
346
+ msgstr ""
347
+
348
+ #: admin/class-whatsappme-admin.php:675
349
+ msgid ""
350
+ "You can use formatting styles like in WhatsApp: _<em>italic</em>_ "
351
+ "*<strong>bold</strong>* ~<del>strikethrough</del>~."
352
  msgstr ""
353
 
354
+ #: admin/class-whatsappme-admin.php:676
355
+ msgid ""
356
+ "You can use dynamic variables that will be replaced by the values of the "
357
+ "page the user visits:"
358
+ msgstr ""
359
+
360
+ #: admin/class-whatsappme-admin.php:680
361
+ msgid "Page Title"
362
+ msgstr ""
363
+
364
+ #: admin/class-whatsappme-admin.php:697
365
  msgid "Settings"
366
  msgstr ""
367
 
368
+ #: admin/class-whatsappme-admin.php:766
369
  msgid "WAme chat"
370
  msgstr ""
371
 
372
+ #: admin/class-whatsappme-admin.php:842 admin/class-whatsappme-admin.php:910
373
  msgid "You can use vars"
374
  msgstr ""
375
 
376
+ #: admin/class-whatsappme-admin.php:851
377
  msgid "Default visibility"
378
  msgstr ""
379
 
380
+ #: admin/class-whatsappme-admin.php:911
381
  msgid "Show Help"
382
  msgstr ""
383
 
384
+ #: admin/class-whatsappme-wooadmin.php:128
385
  msgid "Shop"
386
  msgstr ""
387
 
388
+ #: admin/class-whatsappme-wooadmin.php:129
389
  msgid "Product Page"
390
  msgstr ""
391
 
392
+ #: admin/class-whatsappme-wooadmin.php:130
393
  msgid "Cart"
394
  msgstr ""
395
 
396
+ #: admin/class-whatsappme-wooadmin.php:131
397
  msgid "Checkout"
398
  msgstr ""
399
 
400
+ #: admin/class-whatsappme-wooadmin.php:132
401
  msgid "My Account"
402
  msgstr ""
403
 
404
+ #: admin/class-whatsappme-wooadmin.php:148
405
  msgid "Call to Action for Products"
406
  msgstr ""
407
 
408
+ #: admin/class-whatsappme-wooadmin.php:149
409
  msgid "Call to Action for Products on Sale"
410
  msgstr ""
411
 
412
+ #: admin/class-whatsappme-wooadmin.php:150
413
  msgid "Message for Products"
414
  msgstr ""
415
 
416
+ #: admin/class-whatsappme-wooadmin.php:192
417
  msgid "WooCommerce"
418
  msgstr ""
419
 
420
+ #: admin/class-whatsappme-wooadmin.php:196
421
  msgid "Product Chat Window"
422
  msgstr ""
423
 
424
+ #: admin/class-whatsappme-wooadmin.php:198
425
  msgid ""
426
  "You can define other different texts for the Chat Window on the product "
427
  "pages."
428
  msgstr ""
429
 
430
+ #: admin/class-whatsappme-wooadmin.php:222
431
  msgid ""
432
  "This *{PRODUCT}* can be yours for only *{PRICE}*!\n"
433
  "If you have any questions, ask us."
434
  msgstr ""
435
 
436
+ #: admin/class-whatsappme-wooadmin.php:224
437
  msgid "Define a text for your products to encourage customers to contact"
438
  msgstr ""
439
 
440
+ #: admin/class-whatsappme-wooadmin.php:229
441
  msgid ""
442
  "Save {DISCOUNT}! This *{PRODUCT}* can be yours for only ~{REGULAR}~ "
443
  "*{PRICE}*.\n"
444
  "If you have any questions, ask us."
445
  msgstr ""
446
 
447
+ #: admin/class-whatsappme-wooadmin.php:231
448
  msgid ""
449
  "Define a text for your products on sale to encourage customers to contact"
450
  msgstr ""
451
 
452
+ #: admin/class-whatsappme-wooadmin.php:236
453
  msgid ""
454
  "*Hi {SITE}!*\n"
455
  "I have a question about *{PRODUCT} ({SKU})*"
456
  msgstr ""
457
 
458
+ #: admin/class-whatsappme-wooadmin.php:237
459
  msgid "Predefined text for the first message the client will send you"
460
  msgstr ""
461
 
462
+ #: admin/class-whatsappme-wooadmin.php:272
463
  msgid "<strong>WooCommerce</strong>, in product pages you can also use:"
464
  msgstr ""
465
 
466
+ #: admin/class-whatsappme-wooadmin.php:274
467
  msgid "Product Name"
468
  msgstr ""
469
 
470
+ #: admin/class-whatsappme-wooadmin.php:278
471
  msgid ""
472
  "For the <strong>Call to Action for Products on Sale</strong>, you can also "
473
  "use:"
public/class-whatsappme-public.php CHANGED
@@ -102,6 +102,7 @@ class WhatsAppMe_Public {
102
  'message_start' => __( 'Open chat', 'creame-whatsapp-me' ),
103
  'position' => 'right',
104
  'visibility' => array( 'all' => 'yes' ),
 
105
  ),
106
  apply_filters( 'whatsappme_extra_settings', array() )
107
  );
@@ -150,6 +151,7 @@ class WhatsAppMe_Public {
150
  $settings['whatsapp_web'] = 'yes' == $settings['whatsapp_web'];
151
  $settings['message_badge'] = 'yes' == $settings['message_badge'] && '' != $settings['message_text'];
152
  $settings['position'] = 'right' == $settings['position'] ? 'right' : 'left';
 
153
  $settings['message_send'] = WhatsAppMe_Util::replace_variables( $settings['message_send'] );
154
  // Set true to link http://web.whatsapp.com instead http://api.whatsapp.com
155
  $settings['whatsapp_web'] = apply_filters( 'whatsappme_whatsapp_web', 'yes' == $settings['whatsapp_web'] );
@@ -180,7 +182,7 @@ class WhatsAppMe_Public {
180
  }
181
 
182
  /**
183
- * Register the stylesheets for the public-facing side of the site.
184
  *
185
  * @since 1.0.0
186
  * @since 2.2.2 minified
@@ -189,14 +191,14 @@ class WhatsAppMe_Public {
189
  public function enqueue_styles() {
190
 
191
  if ( $this->show ) {
192
- $styles = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? 'whatsappme.css' : 'whatsappme.min.css';
193
- wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'css/' . $styles, array(), $this->version, 'all' );
194
  }
195
 
196
  }
197
 
198
  /**
199
- * Register the JavaScript for the public-facing side of the site.
200
  *
201
  * @since 1.0.0
202
  * @since 2.2.2 minified
@@ -205,8 +207,8 @@ class WhatsAppMe_Public {
205
  public function enqueue_scripts() {
206
 
207
  if ( $this->show ) {
208
- $script = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? 'whatsappme.js' : 'whatsappme.min.js';
209
- wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . 'js/' . $script, array( 'jquery' ), $this->version, true );
210
  }
211
 
212
  }
@@ -215,6 +217,7 @@ class WhatsAppMe_Public {
215
  * Outputs WhatsApp button html and his settings on footer
216
  *
217
  * @since 1.0.0
 
218
  * @return void
219
  */
220
  public function footer_html() {
@@ -224,12 +227,14 @@ class WhatsAppMe_Public {
224
 
225
  // Clean unnecessary settings on front
226
  $excluded_fields = apply_filters(
227
- 'whatsappme_excluded_fields', array(
 
228
  'visibility',
229
  'position',
230
  'button_tip',
231
  'button_image',
232
  'message_start',
 
233
  )
234
  );
235
 
@@ -256,20 +261,35 @@ class WhatsAppMe_Public {
256
  }
257
  }
258
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
  ?>
260
- <div class="whatsappme <?php echo apply_filters( 'whatsappme_classes', "whatsappme--{$this->settings['position']}" ); ?>" data-settings="<?php echo esc_attr( json_encode( $data ) ); ?>">
261
  <div class="whatsappme__button">
262
- <svg class="whatsappme__button__open" viewBox="0 0 24 24"><path fill="#fff" d="M3.516 3.516c4.686-4.686 12.284-4.686 16.97 0 4.686 4.686 4.686 12.283 0 16.97a12.004 12.004 0 01-13.754 2.299l-5.814.735a.392.392 0 01-.438-.44l.748-5.788A12.002 12.002 0 013.517 3.517zm3.61 17.043l.3.158a9.846 9.846 0 0011.534-1.758c3.843-3.843 3.843-10.074 0-13.918-3.843-3.843-10.075-3.843-13.918 0a9.846 9.846 0 00-1.747 11.554l.16.303-.51 3.942a.196.196 0 00.219.22l3.961-.501zm6.534-7.003l-.933 1.164a9.843 9.843 0 01-3.497-3.495l1.166-.933a.792.792 0 00.23-.94L9.561 6.96a.793.793 0 00-.924-.445 1291.6 1291.6 0 00-2.023.524.797.797 0 00-.588.88 11.754 11.754 0 0010.005 10.005.797.797 0 00.88-.587l.525-2.023a.793.793 0 00-.445-.923L14.6 13.327a.792.792 0 00-.94.23z"/></svg>
263
  <?php if ( $image ) : ?>
264
  <div class="whatsappme__button__image"><?php echo $image; ?></div>
265
  <?php endif; ?>
266
  <?php if ( $this->settings['message_start'] ) : ?>
267
  <div class="whatsappme__button__sendtext"><?php echo $this->settings['message_start']; ?></div>
268
  <?php endif; ?>
269
- <svg class="whatsappme__button__send" viewbox="0 0 400 400" fill="none" fill-rule="evenodd" stroke="#fff" stroke-linecap="round" stroke-width="33">
270
- <path class="wame_plain" stroke-dasharray="1096.67" stroke-dashoffset="1096.67" d="M168.83 200.504H79.218L33.04 44.284a1 1 0 0 1 1.386-1.188L365.083 199.04a1 1 0 0 1 .003 1.808L34.432 357.903a1 1 0 0 1-1.388-1.187l29.42-99.427"/>
271
- <path class="wame_chat" stroke-dasharray="1019.22" stroke-dashoffset="1019.22" d="M318.087 318.087c-52.982 52.982-132.708 62.922-195.725 29.82l-80.449 10.18 10.358-80.112C18.956 214.905 28.836 134.99 81.913 81.913c65.218-65.217 170.956-65.217 236.174 0 42.661 42.661 57.416 102.661 44.265 157.316"/>
272
- </svg>
273
  <?php if ( $this->settings['message_badge'] ) : ?>
274
  <div class="whatsappme__badge">1</div>
275
  <?php endif; ?>
@@ -277,20 +297,25 @@ class WhatsAppMe_Public {
277
  <div class="whatsappme__tooltip"><div><?php echo $this->settings['button_tip']; ?></div></div>
278
  <?php endif; ?>
279
  </div>
280
- <?php if ( $this->settings['message_text'] ) : ?>
281
- <div class="whatsappme__box">
282
- <div class="whatsappme__header">
283
- <svg 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.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-.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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>
284
- <div class="whatsappme__close"><svg 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>
 
 
 
285
  </div>
286
- <div class="whatsappme__message"><div class="whatsappme__message__wrap"><div class="whatsappme__message__content"><?php echo WhatsAppMe_Util::formated_message( $this->settings['message_text'] ); ?></div></div></div>
287
- <?php if ( $copy ) : ?>
288
- <div class="whatsappme__copy"><?php echo $copy; ?> <a href="<?php echo $powered_link; ?>" rel="nofollow noopener" target="_blank"><svg 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>
289
- <?php endif; ?>
290
  </div>
291
- <?php endif; ?>
 
 
 
292
  </div>
293
  <?php
 
 
 
294
  }
295
  }
296
 
102
  'message_start' => __( 'Open chat', 'creame-whatsapp-me' ),
103
  'position' => 'right',
104
  'visibility' => array( 'all' => 'yes' ),
105
+ 'dark_mode' => 'no',
106
  ),
107
  apply_filters( 'whatsappme_extra_settings', array() )
108
  );
151
  $settings['whatsapp_web'] = 'yes' == $settings['whatsapp_web'];
152
  $settings['message_badge'] = 'yes' == $settings['message_badge'] && '' != $settings['message_text'];
153
  $settings['position'] = 'right' == $settings['position'] ? 'right' : 'left';
154
+ $settings['dark_mode'] = in_array( $settings['dark_mode'], array( 'no', 'yes', 'auto' ) ) ? $settings['dark_mode'] : 'no';
155
  $settings['message_send'] = WhatsAppMe_Util::replace_variables( $settings['message_send'] );
156
  // Set true to link http://web.whatsapp.com instead http://api.whatsapp.com
157
  $settings['whatsapp_web'] = apply_filters( 'whatsappme_whatsapp_web', 'yes' == $settings['whatsapp_web'] );
182
  }
183
 
184
  /**
185
+ * Enqueue the stylesheets for the public-facing side of the site.
186
  *
187
  * @since 1.0.0
188
  * @since 2.2.2 minified
191
  public function enqueue_styles() {
192
 
193
  if ( $this->show ) {
194
+ $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
195
+ wp_enqueue_style( $this->plugin_name, plugin_dir_url( __FILE__ ) . "css/{$this->plugin_name}{$min}.css", array(), $this->version, 'all' );
196
  }
197
 
198
  }
199
 
200
  /**
201
+ * Enqueue the JavaScript for the public-facing side of the site.
202
  *
203
  * @since 1.0.0
204
  * @since 2.2.2 minified
207
  public function enqueue_scripts() {
208
 
209
  if ( $this->show ) {
210
+ $min = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
211
+ wp_enqueue_script( $this->plugin_name, plugin_dir_url( __FILE__ ) . "js/{$this->plugin_name}{$min}.js", array( 'jquery' ), $this->version, true );
212
  }
213
 
214
  }
217
  * Outputs WhatsApp button html and his settings on footer
218
  *
219
  * @since 1.0.0
220
+ * @since 3.2.0 Capture and filter output
221
  * @return void
222
  */
223
  public function footer_html() {
227
 
228
  // Clean unnecessary settings on front
229
  $excluded_fields = apply_filters(
230
+ 'whatsappme_excluded_fields',
231
+ array(
232
  'visibility',
233
  'position',
234
  'button_tip',
235
  'button_image',
236
  'message_start',
237
+ 'dark_mode',
238
  )
239
  );
240
 
261
  }
262
  }
263
 
264
+ $whatsappme_classes = 'whatsappme--' . $this->settings['position'];
265
+ $whatsappme_classes .= isset( $_SERVER['HTTP_ACCEPT'] ) && strpos( $_SERVER['HTTP_ACCEPT'], 'image/webp' ) !== false ? ' whatsappme--webp' : '';
266
+ if ( 'no' !== $this->settings['dark_mode'] ) {
267
+ $whatsappme_classes .= 'auto' === $this->settings['dark_mode'] ? ' whatsappme--dark-auto' : ' whatsappme--dark';
268
+ }
269
+
270
+ if ( $this->settings['message_text'] ) {
271
+ $box_content = '<div class="whatsappme__message">' . WhatsAppMe_Util::formated_message( $this->settings['message_text'] ) . '</div>';
272
+ } else {
273
+ $box_content = '';
274
+ }
275
+
276
+ ob_start();
277
+
278
+ // load SVGs
279
+ echo file_get_contents( __DIR__ . '/images/svgs.php' );
280
  ?>
281
+ <div class="whatsappme <?php echo apply_filters( 'whatsappme_classes', $whatsappme_classes ); ?>" data-settings="<?php echo esc_attr( json_encode( $data ) ); ?>">
282
  <div class="whatsappme__button">
283
+ <svg class="whatsappme__button__open"><use xlink:href="#wame_svg__logo"></use></svg>
284
  <?php if ( $image ) : ?>
285
  <div class="whatsappme__button__image"><?php echo $image; ?></div>
286
  <?php endif; ?>
287
  <?php if ( $this->settings['message_start'] ) : ?>
288
  <div class="whatsappme__button__sendtext"><?php echo $this->settings['message_start']; ?></div>
289
  <?php endif; ?>
290
+ <?php if ( $this->settings['message_text'] ) : ?>
291
+ <svg class="whatsappme__button__send"><use xlink:href="#wame_svg__send"></use></svg>
292
+ <?php endif; ?>
 
293
  <?php if ( $this->settings['message_badge'] ) : ?>
294
  <div class="whatsappme__badge">1</div>
295
  <?php endif; ?>
297
  <div class="whatsappme__tooltip"><div><?php echo $this->settings['button_tip']; ?></div></div>
298
  <?php endif; ?>
299
  </div>
300
+ <div class="whatsappme__box">
301
+ <div class="whatsappme__header">
302
+ <svg><use xlink:href="#wame_svg__whatsapp"></use></svg>
303
+ <div class="whatsappme__close"><svg><use xlink:href="#wame_svg__close"></use></svg></div>
304
+ </div>
305
+ <div class="whatsappme__box__scroll">
306
+ <div class="whatsappme__box__content">
307
+ <?php echo apply_filters( 'whatsappme_content', $box_content, $this->settings ); ?>
308
  </div>
 
 
 
 
309
  </div>
310
+ <?php if ( $copy ) : ?>
311
+ <div class="whatsappme__copy"><?php echo $copy; ?> <a href="<?php echo $powered_link; ?>" rel="nofollow noopener" target="_blank"><svg><use xlink:href="#wame_svg__wame"></use></svg></a></div>
312
+ <?php endif; ?>
313
+ </div>
314
  </div>
315
  <?php
316
+ $html_output = ob_get_clean();
317
+
318
+ echo apply_filters( 'whatsappme_html_output', $html_output, $this->settings );
319
  }
320
  }
321
 
public/class-whatsappme-woopublic.php CHANGED
@@ -141,7 +141,8 @@ class WhatsAppMe_WooPublic {
141
  $product = wc_get_product();
142
 
143
  $replacements = array_merge(
144
- $replacements, array(
 
145
  'PRODUCT' => $product->get_name(),
146
  'SKU' => $product->get_sku(),
147
  'REGULAR' => $this->get_regular_price( $product ),
141
  $product = wc_get_product();
142
 
143
  $replacements = array_merge(
144
+ $replacements,
145
+ array(
146
  'PRODUCT' => $product->get_name(),
147
  'SKU' => $product->get_sku(),
148
  'REGULAR' => $this->get_regular_price( $product ),
public/css/whatsappme.css CHANGED
@@ -20,6 +20,13 @@
20
  -webkit-user-select: none;
21
  }
22
 
 
 
 
 
 
 
 
23
  .whatsappme svg path {
24
  fill: currentColor !important;
25
  }
@@ -54,12 +61,12 @@
54
  transition: background-color 1.5s linear;
55
  }
56
 
57
- .whatsappme--dialog .whatsappme__button {
58
  background-color: #128C7E;
59
  transition: background-color 0.2s linear;
60
  }
61
 
62
- .whatsappme--dialog .whatsappme__button:hover {
63
  background-color: #075E54;
64
  }
65
 
@@ -68,13 +75,14 @@
68
  transition: none;
69
  }
70
 
 
71
  /* iOS styles */
72
  @supports (-webkit-overflow-scrolling: touch) {
73
- .whatsappme--dialog .whatsappme__button {
74
  background-color: #34B7F1;
75
  }
76
 
77
- .whatsappme--dialog .whatsappme__button:hover,
78
  .whatsappme__button:active {
79
  background-color: #228bb9;
80
  }
@@ -128,7 +136,7 @@
128
  transition: none;
129
  }
130
 
131
- .whatsappme--dialog .whatsappme__button__sendtext {
132
  padding: 0 4px 0 24px;
133
  max-width: 200px;
134
  opacity: 1;
@@ -161,20 +169,10 @@
161
  animation: wame_badge_out 400ms cubic-bezier(0.215, 0.61, 0.355, 1) 1 both;
162
  }
163
 
164
- .whatsappme--dialog .whatsappme__button {
165
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
166
  }
167
 
168
- .whatsappme .whatsappme__button__send path {
169
- fill: none !important;
170
- stroke: #fff !important;
171
- animation: wame_plain 6s 0s ease-in-out infinite;
172
- }
173
-
174
- .whatsappme .whatsappme__button__send path.wame_chat {
175
- animation-name: wame_chat;
176
- }
177
-
178
  .whatsappme__tooltip {
179
  position: absolute;
180
  top: 14px;
@@ -213,14 +211,14 @@
213
  }
214
 
215
  .whatsappme__button__open,
216
- .whatsappme--dialog .whatsappme__button__send {
217
  display: block;
218
  }
219
 
220
  .whatsappme__button__send,
221
- .whatsappme--dialog .whatsappme__button__open,
222
- .whatsappme--dialog .whatsappme__button__image,
223
- .whatsappme--dialog .whatsappme__tooltip {
224
  display: none;
225
  }
226
 
@@ -231,10 +229,9 @@
231
  z-index: 1;
232
  width: calc(100vw - 40px);
233
  max-width: 400px;
234
- min-height: 280px;
235
- padding-bottom: 60px;
236
  border-radius: 32px;
237
- background: #ede4dd url(../images/background.webp) center repeat-y;
238
  background-size: 100% auto;
239
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, .5);
240
  overflow: hidden;
@@ -243,11 +240,11 @@
243
  transition: opacity 400ms ease-out, transform 0ms linear 300ms;
244
  }
245
 
246
- .nowebp .whatsappme__box {
247
- background-image: url(../images/background.png);
248
  }
249
 
250
- .whatsappme--dialog .whatsappme__box {
251
  opacity: 1;
252
  transform: scale3d(1, 1, 1);
253
  transition: opacity 200ms ease-out, transform 0ms linear;
@@ -300,11 +297,32 @@
300
  margin: auto;
301
  }
302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  .whatsappme__message {
304
  position: relative;
305
  min-height: 80px;
306
- padding: 20px 2px 20px 0;
307
- margin: 34px 26px;
308
  border-radius: 32px;
309
  background-color: #fff;
310
  color: #4A4A4A;
@@ -323,26 +341,6 @@
323
  background-size: 100%;
324
  }
325
 
326
- .whatsappme__message__wrap {
327
- max-height: calc(100vh - 270px);
328
- padding: 0 20px 0 22px;
329
- overflow: auto;
330
- }
331
-
332
- .whatsappme__message__wrap::-webkit-scrollbar {
333
- width: 5px;
334
- background: rgba(0, 0, 0, 0);
335
- }
336
-
337
- .whatsappme__message__wrap::-webkit-scrollbar-thumb {
338
- border-radius: 3px;
339
- background: rgba(0, 0, 0, 0);
340
- }
341
-
342
- .whatsappme__message__wrap:hover::-webkit-scrollbar-thumb {
343
- background: rgba(0, 0, 0, 0.2);
344
- }
345
-
346
  .whatsappme__message a {
347
  text-decoration: underline;
348
  color: #2e8c7d;
@@ -378,8 +376,8 @@
378
  vertical-align: inherit;
379
  }
380
 
381
- /* Align left */
382
 
 
383
  .whatsappme--left {
384
  right: auto;
385
  left: 20px;
@@ -393,7 +391,7 @@
393
  flex-direction: row-reverse;
394
  }
395
 
396
- .whatsappme--left.whatsappme--dialog .whatsappme__button__sendtext {
397
  padding: 0 24px 0 4px;
398
  }
399
 
@@ -421,8 +419,54 @@
421
  text-align: right;
422
  }
423
 
424
- /* rtl */
425
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
426
  [dir=rtl] .whatsappme__close {
427
  right: auto;
428
  left: 24px;
@@ -473,15 +517,15 @@
473
  height: 28px;
474
  }
475
 
476
- .whatsappme__message {
477
- padding: 16px 0;
478
- margin: 15px 21px 20px;
479
- line-height: 24px;
480
  }
481
 
482
- .whatsappme__message__wrap {
483
- max-height: calc(100vh - 194px);
484
- padding: 0 14px;
 
485
  }
486
  }
487
 
@@ -515,29 +559,6 @@
515
  }
516
  }
517
 
518
- @keyframes wame_plain {
519
- 5%,
520
- 45% {
521
- stroke-dashoffset: 0;
522
- }
523
-
524
- 50%,
525
- 100% {
526
- stroke-dashoffset: 1096.67;
527
- }
528
- }
529
-
530
- @keyframes wame_chat {
531
- 50% {
532
- stroke-dashoffset: 1019.22;
533
- }
534
-
535
- 55%,
536
- 95% {
537
- stroke-dashoffset: 0;
538
- }
539
- }
540
-
541
  @keyframes wame_image_loop {
542
  0% {
543
  opacity: 0;
20
  -webkit-user-select: none;
21
  }
22
 
23
+ .whatsappme *,
24
+ .whatsappme *:before,
25
+ .whatsappme *:after {
26
+ box-sizing: border-box;
27
+ }
28
+
29
+ .whatsappme svg,
30
  .whatsappme svg path {
31
  fill: currentColor !important;
32
  }
61
  transition: background-color 1.5s linear;
62
  }
63
 
64
+ .whatsappme--chatbox .whatsappme__button {
65
  background-color: #128C7E;
66
  transition: background-color 0.2s linear;
67
  }
68
 
69
+ .whatsappme--chatbox .whatsappme__button:hover {
70
  background-color: #075E54;
71
  }
72
 
75
  transition: none;
76
  }
77
 
78
+
79
  /* iOS styles */
80
  @supports (-webkit-overflow-scrolling: touch) {
81
+ .whatsappme--chatbox .whatsappme__button {
82
  background-color: #34B7F1;
83
  }
84
 
85
+ .whatsappme--chatbox .whatsappme__button:hover,
86
  .whatsappme__button:active {
87
  background-color: #228bb9;
88
  }
136
  transition: none;
137
  }
138
 
139
+ .whatsappme--chatbox .whatsappme__button__sendtext {
140
  padding: 0 4px 0 24px;
141
  max-width: 200px;
142
  opacity: 1;
169
  animation: wame_badge_out 400ms cubic-bezier(0.215, 0.61, 0.355, 1) 1 both;
170
  }
171
 
172
+ .whatsappme--chatbox .whatsappme__button {
173
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
174
  }
175
 
 
 
 
 
 
 
 
 
 
 
176
  .whatsappme__tooltip {
177
  position: absolute;
178
  top: 14px;
211
  }
212
 
213
  .whatsappme__button__open,
214
+ .whatsappme--chatbox .whatsappme__button__send {
215
  display: block;
216
  }
217
 
218
  .whatsappme__button__send,
219
+ .whatsappme--chatbox .whatsappme__button__open,
220
+ .whatsappme--chatbox .whatsappme__button__image,
221
+ .whatsappme--chatbox .whatsappme__tooltip {
222
  display: none;
223
  }
224
 
229
  z-index: 1;
230
  width: calc(100vw - 40px);
231
  max-width: 400px;
232
+ min-height: 270px;
 
233
  border-radius: 32px;
234
+ background: #ede4dd url(../images/background.png) center repeat-y;
235
  background-size: 100% auto;
236
  box-shadow: 0 2px 6px 0 rgba(0, 0, 0, .5);
237
  overflow: hidden;
240
  transition: opacity 400ms ease-out, transform 0ms linear 300ms;
241
  }
242
 
243
+ .whatsappme--webp .whatsappme__box {
244
+ background-image: url(../images/background.webp);
245
  }
246
 
247
+ .whatsappme--chatbox .whatsappme__box {
248
  opacity: 1;
249
  transform: scale3d(1, 1, 1);
250
  transition: opacity 200ms ease-out, transform 0ms linear;
297
  margin: auto;
298
  }
299
 
300
+ .whatsappme__box__scroll {
301
+ max-height: calc(100vh - 100px);
302
+ padding: 20px 0 80px 0;
303
+ overflow: hidden auto;
304
+ }
305
+
306
+ .whatsappme__box__scroll::-webkit-scrollbar {
307
+ width: 5px;
308
+ background: rgba(0, 0, 0, 0);
309
+ }
310
+
311
+ .whatsappme__box__scroll::-webkit-scrollbar-thumb {
312
+ border-radius: 3px;
313
+ background: rgba(0, 0, 0, 0);
314
+ }
315
+
316
+ .whatsappme__box__scroll:hover::-webkit-scrollbar-thumb {
317
+ background: rgba(0, 0, 0, 0.2);
318
+ }
319
+
320
+
321
  .whatsappme__message {
322
  position: relative;
323
  min-height: 80px;
324
+ padding: 20px;
325
+ margin: 0 26px 26px;
326
  border-radius: 32px;
327
  background-color: #fff;
328
  color: #4A4A4A;
341
  background-size: 100%;
342
  }
343
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  .whatsappme__message a {
345
  text-decoration: underline;
346
  color: #2e8c7d;
376
  vertical-align: inherit;
377
  }
378
 
 
379
 
380
+ /* Align left */
381
  .whatsappme--left {
382
  right: auto;
383
  left: 20px;
391
  flex-direction: row-reverse;
392
  }
393
 
394
+ .whatsappme--left.whatsappme--chatbox .whatsappme__button__sendtext {
395
  padding: 0 24px 0 4px;
396
  }
397
 
419
  text-align: right;
420
  }
421
 
 
422
 
423
+ /* Dark mode */
424
+ .whatsappme--dark .whatsappme__header {
425
+ background: #075e54;
426
+ }
427
+
428
+ .whatsappme--dark .whatsappme__box {
429
+ background: #000;
430
+ }
431
+
432
+ .whatsappme--dark .whatsappme__message {
433
+ background: #505050;
434
+ color: #d8d8d8;
435
+ }
436
+
437
+ .whatsappme--dark .whatsappme__message:before {
438
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA1CAYAAADlE3NNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABVpJREFUeNrcmktv41QYhn2OHSdxkiZNkzZp0ia9UGibdBqSJqACYjGAhBgoArGhIMFixAJGbFkggTRiwRKJxYxGaH4B/4JlV/yArrpslzOZXHm/yCc6NbaTtGnHjqUjO871yftd3nNs1u/3FcaYMgMbt4wmV2ZjY9J+cMw5j8wKnAxGTJ14PF6aRTganUwm8wGfMajBQEjGlpeXj/gMhmQ7mUw2EonEHT5jhYR4esVi8ZjTNkOqqRjdSCTyKoVkt9tV+Iyp1lpbW/smGAzGe72ewmdJNcMwtgiOVBNd3e+qCUfS3traehAKhZKkmp/hZDBSrTU/P/8mqdbpdC75Mb+qJhSjvhbc29t7qKpqkL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MUdJsOWYsYtzkWswyiCNAsHWa8ks/n34MxbwA+6DZrl+EU5fKNYTKkKp1nI5RjEwAyB0Bu81u4CUmwGvwtXf8+KhQKHyFvw3auiUl37Vm/xPrB7AohOQ1AVdqr0p9NYdwjE7+zs3MfVvFd6wzECucWKmzMQjKukqPCU756KsOpUspoJqS6vr7+eblcfkBVV7gqZrnf0mlBxw2GuVTJSYvMKAVVl5rwAvl42Gg0fkPlTRIgc7iZdNyCoUzpdcwF1ElBAaVLo4meXD88PPwDCsa4S4+yjt6Yo+sy7F5n956ONNrmoKnJC2k8Jxhz/8zcB87Pz/85OTn5FYL1b9s49kecG0fNrqSg+AO6kgD62dnZ36enpzXm8XucndZzrHmoW0YPPTH9nwADAK1QyP/ohXd8AAAAAElFTkSuQmCC');
439
+ }
440
+
441
+ .whatsappme--dark .whatsappme__copy {
442
+ color: #25d366;
443
+ }
444
+
445
+ @media (prefers-color-scheme: dark) {
446
+ .whatsappme--dark-auto .whatsappme__header {
447
+ background: #075e54;
448
+ }
449
+
450
+ .whatsappme--dark-auto .whatsappme__box {
451
+ background: #000;
452
+ }
453
+
454
+ .whatsappme--dark-auto .whatsappme__message {
455
+ background: #505050;
456
+ color: #d8d8d8;
457
+ }
458
+
459
+ .whatsappme--dark-auto .whatsappme__message:before {
460
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADcAAAA1CAYAAADlE3NNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABVpJREFUeNrcmktv41QYhn2OHSdxkiZNkzZp0ia9UGibdBqSJqACYjGAhBgoArGhIMFixAJGbFkggTRiwRKJxYxGaH4B/4JlV/yArrpslzOZXHm/yCc6NbaTtGnHjqUjO871yftd3nNs1u/3FcaYMgMbt4wmV2ZjY9J+cMw5j8wKnAxGTJ14PF6aRTganUwm8wGfMajBQEjGlpeXj/gMhmQ7mUw2EonEHT5jhYR4esVi8ZjTNkOqqRjdSCTyKoVkt9tV+Iy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FPLeA4h6qdImhhECZRWIYbfqkJEjQhdfNxwHyOuwC5+VEnb9q38aj0HUFAJwC5isq9nUqlKtiTiUgK8z0K1AonV0pNghKPucVrKiMUdJsOWYsYtzkWswyiCNAsHWa8ks/n34MxbwA+6DZrl+EU5fKNYTKkKp1nI5RjEwAyB0Bu81u4CUmwGvwtXf8+KhQKHyFvw3auiUl37Vm/xPrB7AohOQ1AVdqr0p9NYdwjE7+zs3MfVvFd6wzECucWKmzMQjKukqPCU756KsOpUspoJqS6vr7+eblcfkBVV7gqZrnf0mlBxw2GuVTJSYvMKAVVl5rwAvl42Gg0fkPlTRIgc7iZdNyCoUzpdcwF1ElBAaVLo4meXD88PPwDCsa4S4+yjt6Yo+sy7F5n956ONNrmoKnJC2k8Jxhz/8zcB87Pz/85OTn5FYL1b9s49kecG0fNrqSg+AO6kgD62dnZ36enpzXm8XucndZzrHmoW0YPPTH9nwADAK1QyP/ohXd8AAAAAElFTkSuQmCC');
461
+ }
462
+
463
+ .whatsappme--dark-auto .whatsappme__copy {
464
+ color: #25d366;
465
+ }
466
+ }
467
+
468
+
469
+ /* rtl */
470
  [dir=rtl] .whatsappme__close {
471
  right: auto;
472
  left: 24px;
517
  height: 28px;
518
  }
519
 
520
+ .whatsappme__box__scroll {
521
+ max-height: calc(100vh - 67px);
522
+ padding: 15px 0 70px 0;
 
523
  }
524
 
525
+ .whatsappme__message {
526
+ padding: 16px;
527
+ margin: 0 20px 20px;
528
+ line-height: 24px;
529
  }
530
  }
531
 
559
  }
560
  }
561
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
562
  @keyframes wame_image_loop {
563
  0% {
564
  opacity: 0;
public/css/whatsappme.min.css CHANGED
@@ -1 +1 @@
1
- @font-face{font-family:WAmeIcons;src:url(data:font/woff;base64,d09GRgABAAAAAARgAAsAAAAABBQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIFgGNtYXAAAAFoAA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A9AAMAAQQJAAoANACAd2FtZQB3AGEAbQBlVmVyc2lvbiAxLjAAVgBlAHIAcwBpAG8AbgAgADEALgAwd2FtZQB3AGEAbQBld2FtZQB3AGEAbQBlUmVndWxhcgBSAGUAZwB1AGwAYQByd2FtZQB3AGEAbQBlRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff')}.whatsappme{position:fixed;z-index:1000;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:1.625em;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.whatsappme--show{transform:scale3d(1,1,1);transition:transform .5s cubic-bezier(.18,.89,.32,1.28)}.whatsappme__button{display:-ms-flexbox;display:-webkit-flex;display:flex;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{background-color:#128c7e;transition:background-color .2s linear}.whatsappme--dialog .whatsappme__button:hover{background-color:#075e54}.whatsappme__button:active{background-color:#075e54;transition:none}@supports (-webkit-overflow-scrolling:touch){.whatsappme--dialog .whatsappme__button{background-color:#34b7f1}.whatsappme--dialog .whatsappme__button:hover,.whatsappme__button:active{background-color:#228bb9}}.whatsappme__button svg{width:36px;height:36px;margin:12px 12px}.whatsappme__button .whatsappme__button__send{margin:12px 11px 12px 13px}.whatsappme__button__image{position:absolute;top:1px;right:1px;width:58px;height:58px;border-radius:50%;overflow:hidden;opacity:0}.whatsappme__button__image img{display:block;width:100%;height:100%;object-fit:cover}.whatsappme--show .whatsappme__button__image{animation:wame_image_loop 20s linear 5s infinite normal both}.whatsappme--image .whatsappme__button__image{opacity:1;animation:none}.whatsappme__button__sendtext{padding:0;max-width:0;font-weight:600;line-height:60px;white-space:nowrap;opacity:0;overflow:hidden;transition:none}.whatsappme--dialog .whatsappme__button__sendtext{padding:0 4px 0 24px;max-width:200px;opacity:1;transition:max-width .2s linear,opacity .4s ease-out .2s}.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:wame_badge_in .5s cubic-bezier(.27,.9,.41,1.28) 1 both}.whatsappme__badge.whatsappme__badge--out{animation:wame_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 .whatsappme__button__send path{fill:none!important;stroke:#fff!important;animation:wame_plain 6s 0s ease-in-out infinite}.whatsappme .whatsappme__button__send path.wame_chat{animation-name:wame_chat}.whatsappme__tooltip{position:absolute;top:14px;right:76px;max-width:calc(100vw - 105px);height:32px;padding:0 14px;border:none;border-radius:16px;background:#fff;color:#075e54;line-height:31px;white-space:nowrap;box-shadow:0 1px 4px 0 rgba(0,0,0,.4);opacity:0}.whatsappme__tooltip::after{font:normal normal 400 20px/1em WAmeIcons;content:'\e900';position:absolute;top:6px;right:-12px;color:#fff;text-align:right;text-shadow:2px 1px 3px rgba(0,0,0,.4)}.whatsappme__tooltip div{overflow:hidden;text-overflow:ellipsis}.whatsappme--tooltip .whatsappme__tooltip{animation:wame_tootlip 20s linear 5s 1 normal both}.whatsappme--dialog .whatsappme__button__send,.whatsappme__button__open{display:block}.whatsappme--dialog .whatsappme__button__image,.whatsappme--dialog .whatsappme__button__open,.whatsappme--dialog .whatsappme__tooltip,.whatsappme__button__send{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.webp) 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}.nowebp .whatsappme__box{background-image:url(../images/background.png)}.whatsappme--dialog .whatsappme__box{opacity:1;transform:scale3d(1,1,1);transition:opacity .2s ease-out,transform 0s linear}.whatsappme__header{float:none;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{width:120px;height:100%}.whatsappme__close{display:-ms-flexbox;display:-webkit-flex;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 2px 20px 0;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+z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ZgHmZqa6pycnPywr6/vA47jfPXAWbU0xOCOqE44u2K8Wl9oBUfMa+rq6hIWFhbGBwcHn9pBohogcRWwRiCRTUiACQ6ZYpxY9JAkFAopy8vLM4FAYKyRrgA1GGf1JperLGgEM4cNG4vF3olGo18TQkT9JsRmAdQw66NsGlbn7Ibdd0um2XzOblz6/ZWVlX8JIb8PDQ090gFJDU+e2sBeZ1hBU9NcqvIQzDMFALq+vp7GGP85MjLyBCHE1tPO1LP4eq4FG/hqnlGyeSiwsbHxfygUOu7t7Y00059JUY3ZHFm8k1lT0cGfnJw8c0ojepWFzd6CMpnM3y8AJPEkZ9khO4IAAAAASUVORK5CYII=);background-size:100%}.whatsappme__message__wrap{max-height:calc(100vh - 270px);padding:0 20px 0 22px;overflow:auto}.whatsappme__message__wrap::-webkit-scrollbar{width:5px;background:rgba(0,0,0,0)}.whatsappme__message__wrap::-webkit-scrollbar-thumb{border-radius:3px;background:rgba(0,0,0,0)}.whatsappme__message__wrap:hover::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2)}.whatsappme__message a{text-decoration:underline;color:#2e8c7d}.whatsappme__copy{position:absolute;bottom:9px;left:28px;color:#2e8c7d;font-size:11px;letter-spacing:.2px;line-height:16px;opacity:.4;transition:opacity .25s}.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;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.whatsappme--left.whatsappme--dialog .whatsappme__button__sendtext{padding:0 24px 0 4px}.whatsappme--left .whatsappme__tooltip{right:auto;left:76px}.whatsappme--left .whatsappme__tooltip::after{content:'\e901';left:-12px;right:auto;text-align:left;text-shadow:-2px 1px 3px rgba(0,0,0,.4)}.whatsappme--left .whatsappme__box{right:auto;left:0}.whatsappme--left .whatsappme__copy{left:auto;right:28px;text-align:right}[dir=rtl] .whatsappme__close{right:auto;left:24px}[dir=rtl] .whatsappme__message:before{left:auto;right:-18px;transform:rotateY(180deg)}[dir=rtl] .whatsappme__button{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}[dir=rtl] .whatsappme--left .whatsappme__button{-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row}@media (max-width:480px),(orientation:landscape) and (max-width:767px){.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:16px 0;margin:15px 21px 20px;line-height:24px}.whatsappme__message__wrap{max-height:calc(100vh - 194px);padding:0 14px}}@media (max-width:360px){.whatsappme__copy{width:70px}}@keyframes wame_badge_in{from{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}@keyframes wame_badge_out{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes wame_plain{45%,5%{stroke-dashoffset:0}100%,50%{stroke-dashoffset:1096.67}}@keyframes wame_chat{50%{stroke-dashoffset:1019.22}55%,95%{stroke-dashoffset:0}}@keyframes wame_image_loop{0%{opacity:0}20%,3%{opacity:1}100%,23%{opacity:0}}@keyframes wame_tootlip{0%{opacity:0;transform:scaleY(0)}1%,20%{opacity:1;transform:scaleY(1)}100%,23%{opacity:0;transform:scaleY(1)}}
1
+ @font-face{font-family:WAmeIcons;src:url(data:font/woff;base64,d09GRgABAAAAAARgAAsAAAAABBQAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABPUy8yAAABCAAAAGAAAABgDxIFgGNtYXAAAAFoAAAAVAAAAFQXVtKIZ2FzcAAAAbwAAAAIAAAACAAAABBnbHlmAAABxAAAAHQAAAB0gkciwGhlYWQAAAI4AAAANgAAADYVuuUSaGhlYQAAAnAA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bQBlUmVndWxhcgBSAGUAZwB1AGwAYQByd2FtZQB3AGEAbQBlRm9udCBnZW5lcmF0ZWQgYnkgSWNvTW9vbi4ARgBvAG4AdAAgAGcAZQBuAGUAcgBhAHQAZQBkACAAYgB5ACAASQBjAG8ATQBvAG8AbgAuAAAAAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==) format('woff')}.whatsappme{position:fixed;z-index:1000;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:1.625em;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 *,.whatsappme :after,.whatsappme :before{box-sizing:border-box}.whatsappme svg,.whatsappme svg path{fill:currentColor!important}.whatsappme.whatsappme--show{transform:scale3d(1,1,1);transition:transform .5s cubic-bezier(.18,.89,.32,1.28)}.whatsappme__button{display:-ms-flexbox;display:-webkit-flex;display:flex;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--chatbox .whatsappme__button{background-color:#128c7e;transition:background-color .2s linear}.whatsappme--chatbox .whatsappme__button:hover{background-color:#075e54}.whatsappme__button:active{background-color:#075e54;transition:none}@supports (-webkit-overflow-scrolling:touch){.whatsappme--chatbox .whatsappme__button{background-color:#34b7f1}.whatsappme--chatbox .whatsappme__button:hover,.whatsappme__button:active{background-color:#228bb9}}.whatsappme__button svg{width:36px;height:36px;margin:12px 12px}.whatsappme__button .whatsappme__button__send{margin:12px 11px 12px 13px}.whatsappme__button__image{position:absolute;top:1px;right:1px;width:58px;height:58px;border-radius:50%;overflow:hidden;opacity:0}.whatsappme__button__image img{display:block;width:100%;height:100%;object-fit:cover}.whatsappme--show .whatsappme__button__image{animation:wame_image_loop 20s linear 5s infinite normal both}.whatsappme--image .whatsappme__button__image{opacity:1;animation:none}.whatsappme__button__sendtext{padding:0;max-width:0;font-weight:600;line-height:60px;white-space:nowrap;opacity:0;overflow:hidden;transition:none}.whatsappme--chatbox .whatsappme__button__sendtext{padding:0 4px 0 24px;max-width:200px;opacity:1;transition:max-width .2s linear,opacity .4s ease-out .2s}.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:wame_badge_in .5s cubic-bezier(.27,.9,.41,1.28) 1 both}.whatsappme__badge.whatsappme__badge--out{animation:wame_badge_out .4s cubic-bezier(.215,.61,.355,1) 1 both}.whatsappme--chatbox .whatsappme__button{box-shadow:0 1px 2px 0 rgba(0,0,0,.3)}.whatsappme__tooltip{position:absolute;top:14px;right:76px;max-width:calc(100vw - 105px);height:32px;padding:0 14px;border:none;border-radius:16px;background:#fff;color:#075e54;line-height:31px;white-space:nowrap;box-shadow:0 1px 4px 0 rgba(0,0,0,.4);opacity:0}.whatsappme__tooltip::after{font:normal normal 400 20px/1em WAmeIcons;content:'\e900';position:absolute;top:6px;right:-12px;color:#fff;text-align:right;text-shadow:2px 1px 3px rgba(0,0,0,.4)}.whatsappme__tooltip div{overflow:hidden;text-overflow:ellipsis}.whatsappme--tooltip .whatsappme__tooltip{animation:wame_tootlip 20s linear 5s 1 normal both}.whatsappme--chatbox .whatsappme__button__send,.whatsappme__button__open{display:block}.whatsappme--chatbox .whatsappme__button__image,.whatsappme--chatbox .whatsappme__button__open,.whatsappme--chatbox .whatsappme__tooltip,.whatsappme__button__send{display:none}.whatsappme__box{position:absolute;bottom:0;right:0;z-index:1;width:calc(100vw - 40px);max-width:400px;min-height:270px;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--webp .whatsappme__box{background-image:url(../images/background.webp)}.whatsappme--chatbox .whatsappme__box{opacity:1;transform:scale3d(1,1,1);transition:opacity .2s ease-out,transform 0s linear}.whatsappme__header{float:none;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{width:120px;height:100%}.whatsappme__close{display:-ms-flexbox;display:-webkit-flex;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__box__scroll{max-height:calc(100vh - 100px);padding:20px 0 80px 0;overflow:hidden auto}.whatsappme__box__scroll::-webkit-scrollbar{width:5px;background:rgba(0,0,0,0)}.whatsappme__box__scroll::-webkit-scrollbar-thumb{border-radius:3px;background:rgba(0,0,0,0)}.whatsappme__box__scroll:hover::-webkit-scrollbar-thumb{background:rgba(0,0,0,.2)}.whatsappme__message{position:relative;min-height:80px;padding:20px;margin:0 26px 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/xYK09hCQlmCiTf28vGRnGmZhE183MF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9PT0QDocHOjs731RV9Y1rv+cMlb4Oiy3garWW1b2sPMfceZgHmZqa6pycnPywr6/vA47jfPXAWbU0xOCOqE44u2K8Wl9oBUfMa+rq6hIWFhbGBwcHn9pBohogcRWwRiCRTUiACQ6ZYpxY9JAkFAopy8vLM4FAYKyRrgA1GGf1JperLGgEM4cNG4vF3olGo18TQkT9JsRmAdQw66NsGlbn7Ibdd0um2XzOblz6/ZWVlX8JIb8PDQ090gFJDU+e2sBeZ1hBU9NcqvIQzDMFALq+vp7GGP85MjLyBCHE1tPO1LP4eq4FG/hqnlGyeSiwsbHxfygUOu7t7Y00059JUY3ZHFm8k1lT0cGfnJw8c0ojepWFzd6CMpnM3y8AJPEkZ9khO4IAAAAASUVORK5CYII=);background-size:100%}.whatsappme__message a{text-decoration:underline;color:#2e8c7d}.whatsappme__copy{position:absolute;bottom:9px;left:28px;color:#2e8c7d;font-size:11px;letter-spacing:.2px;line-height:16px;opacity:.4;transition:opacity .25s}.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;-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}.whatsappme--left.whatsappme--chatbox .whatsappme__button__sendtext{padding:0 24px 0 4px}.whatsappme--left .whatsappme__tooltip{right:auto;left:76px}.whatsappme--left .whatsappme__tooltip::after{content:'\e901';left:-12px;right:auto;text-align:left;text-shadow:-2px 1px 3px rgba(0,0,0,.4)}.whatsappme--left .whatsappme__box{right:auto;left:0}.whatsappme--left .whatsappme__copy{left:auto;right:28px;text-align:right}.whatsappme--dark .whatsappme__header{background:#075e54}.whatsappme--dark .whatsappme__box{background:#000}.whatsappme--dark .whatsappme__message{background:#505050;color:#d8d8d8}.whatsappme--dark .whatsappme__message:before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xioEcZmHDMFYAs00+j0Dm5ubKgMnR4jWV75eh0Dhwdv6ujTxZz+VynwCmjuMSqtsaikGElBGqEJDTbNgrcLIbH/g7QH1cq9WeUOgJEFLHK8qMC2dVrY9Qy+7v7z9CCU9PMs3w0sYdvF4HJbyOEMx4MdyuAqdYFmI0xecbd/B+4YuLi3+bzeY5wtK3cMy8D0VWLIChUz+D9/sCefcQBWVx4g+2ubdFdvrimPZi3CZciACRd6+gOb9O93XgtVwK3aHatNwmh7S5aXhPAM8FaJ0R7SNEfRKRYOi6HiOvSS0Fg44jGGFyMvRTZODrGAArHJfggiag+OEBMw9VB0v2P6EszoZblupUujpDy3WAjSI65vFHpjH1WYZlW0FPLeA4h6qdImhhECZRWIYbfqkJEjQhdfNxwHyOuwC5+VEnb9q38aj0HUFAJwC5isq9nUqlKtiTiUgK8z0K1AonV0pNghKPucVrKiMUdJsOWYsYtzkWswyiCNAsHWa8ks/n34MxbwA+6DZrl+EU5fKNYTKkKp1nI5RjEwAyB0Bu81u4CUmwGvwtXf8+KhQKHyFvw3auiUl37Vm/xPrB7AohOQ1AVdqr0p9NYdwjE7+zs3MfVvFd6wzECucWKmzMQjKukqPCU756KsOpUspoJqS6vr7+eblcfkBVV7gqZrnf0mlBxw2GuVTJSYvMKAVVl5rwAvl42Gg0fkPlTRIgc7iZdNyCoUzpdcwF1ElBAaVLo4meXD88PPwDCsa4S4+yjt6Yo+sy7F5n956ONNrmoKnJC2k8Jxhz/8zcB87Pz/85OTn5FYL1b9s49kecG0fNrqSg+AO6kgD62dnZ36enpzXm8XucndZzrHmoW0YPPTH9nwADAK1QyP/ohXd8AAAAAElFTkSuQmCC)}.whatsappme--dark .whatsappme__copy{color:#25d366}@media (prefers-color-scheme:dark){.whatsappme--dark-auto .whatsappme__header{background:#075e54}.whatsappme--dark-auto .whatsappme__box{background:#000}.whatsappme--dark-auto .whatsappme__message{background:#505050;color:#d8d8d8}.whatsappme--dark-auto .whatsappme__message:before{background-image:url(data:image/png;base64,i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Dm5ubKgMnR4jWV75eh0Dhwdv6ujTxZz+VynwCmjuMSqtsaikGElBGqEJDTbNgrcLIbH/g7QH1cq9WeUOgJEFLHK8qMC2dVrY9Qy+7v7z9CCU9PMs3w0sYdvF4HJbyOEMx4MdyuAqdYFmI0xecbd/B+4YuLi3+bzeY5wtK3cMy8D0VWLIChUz+D9/sCefcQBWVx4g+2ubdFdvrimPZi3CZciACRd6+gOb9O93XgtVwK3aHatNwmh7S5aXhPAM8FaJ0R7SNEfRKRYOi6HiOvSS0Fg44jGGFyMvRTZODrGAArHJfggiag+OEBMw9VB0v2P6EszoZblupUujpDy3WAjSI65vFHpjH1WYZlW0FPLeA4h6qdImhhECZRWIYbfqkJEjQhdfNxwHyOuwC5+VEnb9q38aj0HUFAJwC5isq9nUqlKtiTiUgK8z0K1AonV0pNghKPucVrKiMUdJsOWYsYtzkWswyiCNAsHWa8ks/n34MxbwA+6DZrl+EU5fKNYTKkKp1nI5RjEwAyB0Bu81u4CUmwGvwtXf8+KhQKHyFvw3auiUl37Vm/xPrB7AohOQ1AVdqr0p9NYdwjE7+zs3MfVvFd6wzECucWKmzMQjKukqPCU756KsOpUspoJqS6vr7+eblcfkBVV7gqZrnf0mlBxw2GuVTJSYvMKAVVl5rwAvl42Gg0fkPlTRIgc7iZdNyCoUzpdcwF1ElBAaVLo4meXD88PPwDCsa4S4+yjt6Yo+sy7F5n956ONNrmoKnJC2k8Jxhz/8zcB87Pz/85OTn5FYL1b9s49kecG0fNrqSg+AO6kgD62dnZ36enpzXm8XucndZzrHmoW0YPPTH9nwADAK1QyP/ohXd8AAAAAElFTkSuQmCC)}.whatsappme--dark-auto .whatsappme__copy{color:#25d366}}[dir=rtl] .whatsappme__close{right:auto;left:24px}[dir=rtl] .whatsappme__message:before{left:auto;right:-18px;transform:rotateY(180deg)}[dir=rtl] .whatsappme__button{-ms-flex-direction:row-reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse}[dir=rtl] .whatsappme--left .whatsappme__button{-ms-flex-direction:row;-webkit-flex-direction:row;flex-direction:row}@media (max-width:480px),(orientation:landscape) and (max-width:767px){.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__box__scroll{max-height:calc(100vh - 67px);padding:15px 0 70px 0}.whatsappme__message{padding:16px;margin:0 20px 20px;line-height:24px}}@media (max-width:360px){.whatsappme__copy{width:70px}}@keyframes wame_badge_in{from{opacity:0;transform:translateY(50px)}to{opacity:1;transform:translateY(0)}}@keyframes wame_badge_out{from{opacity:1;transform:translateY(0)}to{opacity:0;transform:translateY(-20px)}}@keyframes wame_image_loop{0%{opacity:0}20%,3%{opacity:1}100%,23%{opacity:0}}@keyframes wame_tootlip{0%{opacity:0;transform:scaleY(0)}1%,20%{opacity:1;transform:scaleY(1)}100%,23%{opacity:0;transform:scaleY(1)}}
public/images/svgs.php ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <svg style="display:none;">
2
+ <symbol id="wame_svg__logo" viewBox="0 0 24 24"><path fill="#fff" d="M3.516 3.516c4.686-4.686 12.284-4.686 16.97 0 4.686 4.686 4.686 12.283 0 16.97a12.004 12.004 0 01-13.754 2.299l-5.814.735a.392.392 0 01-.438-.44l.748-5.788A12.002 12.002 0 013.517 3.517zm3.61 17.043l.3.158a9.846 9.846 0 0011.534-1.758c3.843-3.843 3.843-10.074 0-13.918-3.843-3.843-10.075-3.843-13.918 0a9.846 9.846 0 00-1.747 11.554l.16.303-.51 3.942a.196.196 0 00.219.22l3.961-.501zm6.534-7.003l-.933 1.164a9.843 9.843 0 01-3.497-3.495l1.166-.933a.792.792 0 00.23-.94L9.561 6.96a.793.793 0 00-.924-.445 1291.6 1291.6 0 00-2.023.524.797.797 0 00-.588.88 11.754 11.754 0 0010.005 10.005.797.797 0 00.88-.587l.525-2.023a.793.793 0 00-.445-.923L14.6 13.327a.792.792 0 00-.94.23z"/></symbol>
3
+ <symbol id="wame_svg__close" 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"/></symbol>
4
+ <symbol id="wame_svg__whatsapp" viewBox="0 0 120 28"><path 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 1 0 2.3zm1.7-4.7a4 4 0 0 0-3.3-1.6c-.6 0-1.2.1-1.7.4a3 3 0 0 0-1.2 1.1V11h-2.6v13h2.7v-4.5c.3.4.7.8 1.2 1 .6.3 1.1.4 1.7.4a4 4 0 0 0 3.2-1.5c.4-.5.6-1 .8-1.6.2-.6.3-1.2.3-1.9s-.1-1.3-.3-2c-.2-.6-.4-1.2-.8-1.6zm-17.5 3.2l1.7-5 1.7 5h-3.4zm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5-.8.9-.2.3-.3.8-.3 1.3s.1 1 .3 1.3c.1.4.4.7.7 1l1 .4c.4.2.9.2 1.3.2a6 6 0 0 0 1.8-.2c.6-.2 1-.5 1.5-1a4 4 0 0 0 .2 1H70l-.3-1v-1.2zm-11-6.7c-.2-.4-.6-.6-1-.8-.5-.2-1-.3-1.8-.3-.5 0-1 .1-1.5.4a3 3 0 0 0-1.3 1.2v-5h-2.7v13.4H53v-5.1c0-1 .2-1.7.5-2.2.3-.4.9-.6 1.6-.6.6 0 1 .2 1.3.6.3.4.4 1 .4 1.8v5.5h2.7v-6c0-.6 0-1.2-.2-1.6 0-.5-.3-1-.5-1.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"/></symbol>
5
+ <symbol id="wame_svg__wame" viewBox="0 0 72 17"><path 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"/></symbol>
6
+ <symbol id="wame_svg__send" viewbox="0 0 400 400" fill="none" fill-rule="evenodd" stroke="#fff" stroke-linecap="round" stroke-width="33">
7
+ <path id="wame_plain" stroke-dasharray="1097" stroke-dashoffset="1097" d="M168.83 200.504H79.218L33.04 44.284a1 1 0 0 1 1.386-1.188L365.083 199.04a1 1 0 0 1 .003 1.808L34.432 357.903a1 1 0 0 1-1.388-1.187l29.42-99.427"/>
8
+ <path id="wame_chat" stroke-dasharray="1020" stroke-dashoffset="1020" d="M318.087 318.087c-52.982 52.982-132.708 62.922-195.725 29.82l-80.449 10.18 10.358-80.112C18.956 214.905 28.836 134.99 81.913 81.913c65.218-65.217 170.956-65.217 236.174 0 42.661 42.661 57.416 102.661 44.265 157.316"/>
9
+ <animate xlink:href="#wame_plain" attributeName="stroke-dashoffset" values="1097;0;0;1097;1097" keyTimes="0;0.05;0.45;0.5;1" dur="6s" begin="1.2s" repeatCount="indefinite" />
10
+ <animate xlink:href="#wame_chat" attributeName="stroke-dashoffset" values="1020;0;0;1020;1020" keyTimes="0;0.05;0.45;0.5;1" dur="6s" begin="4.2s" repeatCount="indefinite" />
11
+ </symbol>
12
+ </svg>
public/js/whatsappme.js CHANGED
@@ -1,20 +1,115 @@
1
- (function ($) {
2
  'use strict';
3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  $(function () {
5
- var $whatsappme = $('.whatsappme');
6
- var $badge = $whatsappme.find('.whatsappme__badge');
7
- var wame_settings = $whatsappme.data('settings');
8
- var store;
9
 
10
  // Fallback if localStorage not supported (iOS incognito)
11
  // Implements functional storage in memory and will not persist between page loads
12
  try {
13
  localStorage.setItem('test', 1);
14
  localStorage.removeItem('test');
15
- store = localStorage;
16
  } catch (e) {
17
- store = {
18
  _data: {},
19
  setItem: function (id, val) { this._data[id] = String(val); },
20
  getItem: function (id) { return this._data.hasOwnProperty(id) ? this._data[id] : null; }
@@ -22,84 +117,86 @@
22
  }
23
 
24
  // In some strange cases data settings are empty
25
- if (typeof (wame_settings) == 'undefined') {
26
  try {
27
- wame_settings = JSON.parse($whatsappme.attr('data-settings'));
28
  } catch (error) {
29
- wame_settings = undefined;
30
  }
31
  }
32
 
33
  // Only works if whatsappme is defined
34
- if ($whatsappme.length && !!wame_settings && !!wame_settings.telephone) {
35
  whatsappme_magic();
36
  }
37
 
38
  function whatsappme_magic() {
39
- var is_mobile = !!navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i);
40
- var button_delay = wame_settings.button_delay * 1000;
41
- var chat_delay = wame_settings.message_delay * 1000;
42
- var has_cta = !!wame_settings.message_text;
43
- var wa_web = wame_settings.whatsapp_web && !is_mobile;
44
- var dialog_visible = false;
45
  var timeoutID, timeoutCTA;
46
 
47
- // Check WebP support
48
- var webP = new Image();
49
- webP.src = 'data:image/webp;base64,UklGRi4AAABXRUJQVlA4TCEAAAAvAUAAEB8wAiMwAgSSNtse/cXjxyCCmrYNWPwmHRH9jwMA';
50
- webP.onload = webP.onerror = function () { if (webP.height !== 2) $whatsappme.addClass('nowebp'); }
51
-
52
  // Stored values
53
- var messages_viewed = (store.getItem('whatsappme_hashes') || '').split(',').filter(Boolean);
54
- var is_second_visit = store.getItem('whatsappme_visited') == 'yes';
55
 
56
- var message_hash = has_cta ? hash(wame_settings.message_text).toString() : 'no_cta';
57
  var is_viewed = messages_viewed.indexOf(message_hash) > -1;
58
 
59
- store.setItem('whatsappme_visited', 'yes');
60
 
61
- if (!wame_settings.mobile_only || is_mobile) {
 
 
 
 
 
 
 
 
 
 
62
  var classes = 'whatsappme--show';
63
- if (!is_viewed && (!has_cta || !chat_delay || wame_settings.message_badge || !is_second_visit)) {
64
  classes += ' whatsappme--tooltip';
65
  }
66
  // Show button (and tooltip)
67
- setTimeout(function () { $whatsappme.addClass(classes); }, button_delay);
68
 
69
  if (has_cta && !is_viewed && chat_delay) {
70
- if (wame_settings.message_badge) {
71
  // Show badge
72
- timeoutCTA = setTimeout(function () { $badge.addClass('whatsappme__badge--in'); }, button_delay + chat_delay);
73
  } else if (is_second_visit) {
74
- // Show dialog
75
- timeoutCTA = setTimeout(dialog_show, button_delay + chat_delay);
76
  }
77
  }
78
  }
79
 
80
- if (has_cta && !is_mobile) {
81
- $('.whatsappme__button', $whatsappme)
82
- .mouseenter(function () { if (!dialog_visible) timeoutID = setTimeout(dialog_show, 1500); })
83
  .mouseleave(function () { clearTimeout(timeoutID); });
84
  }
85
 
86
- $('.whatsappme__button', $whatsappme).click(function () {
87
- if (has_cta && !dialog_visible) {
88
- dialog_show();
89
  } else {
90
- var args = { link: whatsapp_link(wa_web, wame_settings.telephone, wame_settings.message_send) };
91
  var secure_link = new RegExp("^https?:\/\/(wa\.me|(api|web|chat)\.whatsapp\.com|" + location.hostname.replace('.', '\.') + ")\/.*", 'i');
92
 
93
- if (dialog_visible) {
94
- dialog_hide();
95
  }
96
  // Trigger custom event (args obj allow edit link by third party scripts)
97
- $(document).trigger('whatsappme:open', [args, wame_settings]);
98
 
99
  // Ensure the link is safe
100
  if (secure_link.test(args.link)) {
101
  // Send analytics events
102
- send_event(args.link);
103
  // Open WhatsApp link
104
  window.open(args.link, 'whatsappme');
105
  } else {
@@ -108,91 +205,32 @@
108
  }
109
  });
110
 
111
- $('.whatsappme__close', $whatsappme).click(dialog_hide);
112
 
113
- function dialog_show() {
114
- $whatsappme.addClass('whatsappme--dialog');
115
- dialog_visible = true;
116
- clearTimeout(timeoutCTA);
117
-
118
- if (wame_settings.message_badge && $badge.hasClass('whatsappme__badge--in')) {
119
- $badge.toggleClass('whatsappme__badge--in whatsappme__badge--out');
120
- }
121
- // Trigger custom event
122
- $(document).trigger('whatsappme:show');
123
- }
124
 
125
- function dialog_hide() {
126
- $whatsappme.removeClass('whatsappme--dialog whatsappme--tooltip');
127
- dialog_visible = false;
128
- save_message_viewed();
129
- // Trigger custom event
130
- $(document).trigger('whatsappme:hide');
 
 
 
 
 
131
  }
132
 
133
- function save_message_viewed() {
134
- if (!is_viewed) {
135
- messages_viewed.push(message_hash);
136
- store.setItem('whatsappme_hashes', messages_viewed.join(','));
137
- is_viewed = true;
138
- }
139
- }
140
  }
141
- });
142
 
143
- // Return a simple hash (source https://gist.github.com/iperelivskiy/4110988#gistcomment-2697447)
144
- function hash(s) {
145
- for (var i = 0, h = 1; i < s.length; i++) {
146
- h = Math.imul(h + s.charCodeAt(i) | 0, 2654435761);
147
- }
148
- return (h ^ h >>> 17) >>> 0;
149
- };
150
-
151
- // Return WhatsApp link with optional message
152
- function whatsapp_link(wa_web, phone, message) {
153
- var link = wa_web ? 'https://web.whatsapp.com/send' : 'https://api.whatsapp.com/send';
154
-
155
- return link + '?phone=' + encodeURIComponent(phone) + '&text=' + encodeURIComponent(message || '');
156
- }
157
-
158
- // Trigger Google Analytics event
159
- function send_event(link) {
160
- if (typeof dataLayer == 'object') {
161
- // Send Google Tag Manager custom event
162
- dataLayer.push({
163
- 'event': 'WhatsAppMe',
164
- 'eventAction': 'click',
165
- 'eventLabel': link
166
- });
167
- }
168
- if (typeof gtag == 'function') {
169
- // Send custom event (Global Site Tag - gtag.js)
170
- gtag('event', 'click', {
171
- 'event_category': 'WhatsAppMe',
172
- 'event_label': link,
173
- 'transport_type': 'beacon'
174
- });
175
- } else if (typeof ga == 'function' && typeof ga.getAll == 'function') {
176
- // Send custom event (Universal Analtics - analytics.js)
177
- ga('set', 'transport', 'beacon');
178
- var trackers = ga.getAll();
179
- trackers.forEach(function (tracker) {
180
- tracker.send("event", 'WhatsAppMe', 'click', link);
181
- });
182
- }
183
- if (typeof fbq == 'function') {
184
- // Send Facebook Pixel custom event
185
- fbq('trackCustom', 'WhatsAppMe', { eventAction: 'click', eventLabel: link });
186
- }
187
- }
188
-
189
- // Math.imul polyfill (source https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul#Polyfill)
190
- Math.imul = Math.imul || function (a, b) {
191
- var ah = (a >>> 16) & 0xffff;
192
- var al = a & 0xffff;
193
- var bh = (b >>> 16) & 0xffff;
194
- var bl = b & 0xffff;
195
- return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0);
196
- };
197
 
198
- }(jQuery));
1
+ (function ($, window) {
2
  'use strict';
3
 
4
+ // Math.imul polyfill (source https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/imul#Polyfill)
5
+ Math.imul = Math.imul || function (a, b) {
6
+ var ah = (a >>> 16) & 0xffff;
7
+ var al = a & 0xffff;
8
+ var bh = (b >>> 16) & 0xffff;
9
+ var bl = b & 0xffff;
10
+ return ((al * bl) + (((ah * bl + al * bh) << 16) >>> 0) | 0);
11
+ };
12
+
13
+ window.wame_public = window.wame_public || {};
14
+
15
+ wame_public = $.extend({
16
+ $wame: null,
17
+ $badge: null,
18
+ settings: null,
19
+ store: null,
20
+ chatbox: false,
21
+ is_mobile: false,
22
+ }, wame_public);
23
+
24
+ // Trigger Google Analytics event
25
+ wame_public.send_event = function (link) {
26
+ if (typeof dataLayer == 'object') {
27
+ // Send Google Tag Manager custom event
28
+ dataLayer.push({
29
+ 'event': 'WhatsAppMe',
30
+ 'eventAction': 'click',
31
+ 'eventLabel': link
32
+ });
33
+ }
34
+ if (typeof gtag == 'function') {
35
+ // Send custom event (Global Site Tag - gtag.js)
36
+ gtag('event', 'click', {
37
+ 'event_category': 'WhatsAppMe',
38
+ 'event_label': link,
39
+ 'transport_type': 'beacon'
40
+ });
41
+ } else if (typeof ga == 'function' && typeof ga.getAll == 'function') {
42
+ // Send custom event (Universal Analtics - analytics.js)
43
+ ga('set', 'transport', 'beacon');
44
+ var trackers = ga.getAll();
45
+ trackers.forEach(function (tracker) {
46
+ tracker.send("event", 'WhatsAppMe', 'click', link);
47
+ });
48
+ }
49
+ if (typeof fbq == 'function') {
50
+ // Send Facebook Pixel custom event
51
+ fbq('trackCustom', 'WhatsAppMe', { eventAction: 'click', eventLabel: link });
52
+ }
53
+ }
54
+
55
+ // Return a simple hash (source https://gist.github.com/iperelivskiy/4110988#gistcomment-2697447)
56
+ wame_public.hash = function (s) {
57
+ for (var i = 0, h = 1; i < s.length; i++) {
58
+ h = Math.imul(h + s.charCodeAt(i) | 0, 2654435761);
59
+ }
60
+ return (h ^ h >>> 17) >>> 0;
61
+ };
62
+
63
+ // Return WhatsApp link with optional message
64
+ wame_public.whatsapp_link = function (phone, message, wa_web) {
65
+ wa_web = typeof wa_web != 'undefined' ? wa_web : wame_public.settings.whatsapp_web && !wame_public.is_mobile;
66
+ var link = wa_web ? 'https://web.whatsapp.com/send' : 'https://api.whatsapp.com/send';
67
+
68
+ return link + '?phone=' + encodeURIComponent(phone) + '&text=' + encodeURIComponent(message || '');
69
+ };
70
+
71
+ wame_public.chatbox_show = function () {
72
+ wame_public.$wame.addClass('whatsappme--chatbox');
73
+ wame_public.chatbox = true;
74
+
75
+ if (wame_public.settings.message_badge && wame_public.$badge.hasClass('whatsappme__badge--in')) {
76
+ wame_public.$badge.toggleClass('whatsappme__badge--in whatsappme__badge--out');
77
+ }
78
+ // Trigger custom event
79
+ $(document).trigger('whatsappme:show');
80
+ };
81
+
82
+ wame_public.chatbox_hide = function () {
83
+ wame_public.$wame.removeClass('whatsappme--chatbox whatsappme--tooltip');
84
+ wame_public.chatbox = false;
85
+ // Trigger custom event
86
+ $(document).trigger('whatsappme:hide');
87
+ };
88
+
89
+ wame_public.save_hash = function (message_hash) {
90
+ var messages_viewed = (wame_public.store.getItem('whatsappme_hashes') || '').split(',').filter(Boolean);
91
+
92
+ if (messages_viewed.indexOf(message_hash) == -1) {
93
+ messages_viewed.push(message_hash);
94
+ wame_public.store.setItem('whatsappme_hashes', messages_viewed.join(','));
95
+ }
96
+ };
97
+
98
+ // Ready!!
99
  $(function () {
100
+ wame_public.$wame = $('.whatsappme');
101
+ wame_public.$badge = wame_public.$wame.find('.whatsappme__badge');
102
+ wame_public.settings = wame_public.$wame.data('settings');
103
+ wame_public.is_mobile = !!navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i);
104
 
105
  // Fallback if localStorage not supported (iOS incognito)
106
  // Implements functional storage in memory and will not persist between page loads
107
  try {
108
  localStorage.setItem('test', 1);
109
  localStorage.removeItem('test');
110
+ wame_public.store = localStorage;
111
  } catch (e) {
112
+ wame_public.store = {
113
  _data: {},
114
  setItem: function (id, val) { this._data[id] = String(val); },
115
  getItem: function (id) { return this._data.hasOwnProperty(id) ? this._data[id] : null; }
117
  }
118
 
119
  // In some strange cases data settings are empty
120
+ if (typeof wame_public.settings == 'undefined') {
121
  try {
122
+ wame_public.settings = JSON.parse(wame_public.$wame.attr('data-settings'));
123
  } catch (error) {
124
+ wame_public.settings = undefined;
125
  }
126
  }
127
 
128
  // Only works if whatsappme is defined
129
+ if (wame_public.$wame.length && !!wame_public.settings && !!wame_public.settings.telephone) {
130
  whatsappme_magic();
131
  }
132
 
133
  function whatsappme_magic() {
134
+ var button_delay = wame_public.settings.button_delay * 1000;
135
+ var chat_delay = wame_public.settings.message_delay * 1000;
136
+ var has_cta = !!wame_public.settings.message_text;
 
 
 
137
  var timeoutID, timeoutCTA;
138
 
 
 
 
 
 
139
  // Stored values
140
+ var messages_viewed = (wame_public.store.getItem('whatsappme_hashes') || '').split(',').filter(Boolean);
141
+ var is_second_visit = wame_public.store.getItem('whatsappme_visited') == 'yes';
142
 
143
+ var message_hash = has_cta ? wame_public.hash(wame_public.settings.message_text).toString() : 'no_cta';
144
  var is_viewed = messages_viewed.indexOf(message_hash) > -1;
145
 
146
+ wame_public.store.setItem('whatsappme_visited', 'yes');
147
 
148
+ function chatbox_show() {
149
+ clearTimeout(timeoutCTA);
150
+ wame_public.chatbox_show();
151
+ }
152
+
153
+ function chatbox_hide() {
154
+ wame_public.save_hash(message_hash);
155
+ wame_public.chatbox_hide();
156
+ }
157
+
158
+ if (!wame_public.settings.mobile_only || wame_public.is_mobile) {
159
  var classes = 'whatsappme--show';
160
+ if (!is_viewed && (!has_cta || !chat_delay || wame_public.settings.message_badge || !is_second_visit)) {
161
  classes += ' whatsappme--tooltip';
162
  }
163
  // Show button (and tooltip)
164
+ setTimeout(function () { wame_public.$wame.addClass(classes); }, button_delay);
165
 
166
  if (has_cta && !is_viewed && chat_delay) {
167
+ if (wame_public.settings.message_badge) {
168
  // Show badge
169
+ timeoutCTA = setTimeout(function () { wame_public.$badge.addClass('whatsappme__badge--in'); }, button_delay + chat_delay);
170
  } else if (is_second_visit) {
171
+ // Show chatbox
172
+ timeoutCTA = setTimeout(chatbox_show, button_delay + chat_delay);
173
  }
174
  }
175
  }
176
 
177
+ if (has_cta && !wame_public.is_mobile) {
178
+ $('.whatsappme__button', wame_public.$wame)
179
+ .mouseenter(function () { if (!wame_public.chatbox) timeoutID = setTimeout(chatbox_show, 1500); })
180
  .mouseleave(function () { clearTimeout(timeoutID); });
181
  }
182
 
183
+ $('.whatsappme__button', wame_public.$wame).click(function () {
184
+ if (has_cta && !wame_public.chatbox) {
185
+ chatbox_show();
186
  } else {
187
+ var args = { link: wame_public.whatsapp_link(wame_public.settings.telephone, wame_public.settings.message_send) };
188
  var secure_link = new RegExp("^https?:\/\/(wa\.me|(api|web|chat)\.whatsapp\.com|" + location.hostname.replace('.', '\.') + ")\/.*", 'i');
189
 
190
+ if (wame_public.chatbox) {
191
+ chatbox_hide();
192
  }
193
  // Trigger custom event (args obj allow edit link by third party scripts)
194
+ $(document).trigger('whatsappme:open', [args, wame_public.settings]);
195
 
196
  // Ensure the link is safe
197
  if (secure_link.test(args.link)) {
198
  // Send analytics events
199
+ wame_public.send_event(args.link);
200
  // Open WhatsApp link
201
  window.open(args.link, 'whatsappme');
202
  } else {
205
  }
206
  });
207
 
208
+ $('.whatsappme__close', wame_public.$wame).click(chatbox_hide);
209
 
210
+ // Only scroll WAme message box (no all body)
211
+ // TODO: disable also on touch
212
+ $('.whatsappme__box__scroll').on('mousewheel DOMMouseScroll', function (e) {
213
+ e.preventDefault();
214
+ var delta = e.originalEvent.wheelDelta || -e.originalEvent.detail;
215
+ this.scrollTop += (delta < 0 ? 1 : -1) * 30;
216
+ });
 
 
 
 
217
 
218
+ // Hide on mobile when virtual keyboard is open
219
+ if (wame_public.is_mobile) {
220
+ var initial_height = window.innerHeight;
221
+ var timeoutKB;
222
+
223
+ $(document).on('focus blur', 'input, textarea', function () {
224
+ clearTimeout(timeoutKB);
225
+ timeoutKB = setTimeout(function () {
226
+ wame_public.$wame.toggleClass('whatsappme--show', initial_height * 0.7 < window.innerHeight);
227
+ }, 800);
228
+ });
229
  }
230
 
231
+ $(document).trigger('whatsappme:start');
 
 
 
 
 
 
232
  }
 
233
 
234
+ });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
 
236
+ }(jQuery, window));
public/js/whatsappme.min.js CHANGED
@@ -1 +1 @@
1
- !function(e){"use strict";function t(e,t,a){return(e?"https://web.whatsapp.com/send":"https://api.whatsapp.com/send")+"?phone="+encodeURIComponent(t)+"&text="+encodeURIComponent(a||"")}e(function(){var a,n=e(".whatsappme"),s=n.find(".whatsappme__badge"),o=n.data("settings");try{localStorage.setItem("test",1),localStorage.removeItem("test"),a=localStorage}catch(e){a={_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(n.attr("data-settings"))}catch(e){o=void 0}n.length&&o&&o.telephone&&function(){var i,p,c=!!navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i),m=1e3*o.button_delay,r=1e3*o.message_delay,h=!!o.message_text,l=o.whatsapp_web&&!c,g=!1,u=new Image;u.src="data:image/webp;base64,UklGRi4AAABXRUJQVlA4TCEAAAAvAUAAEB8wAiMwAgSSNtse/cXjxyCCmrYNWPwmHRH9jwMA",u.onload=u.onerror=function(){2!==u.height&&n.addClass("nowebp")};var d=(a.getItem("whatsappme_hashes")||"").split(",").filter(Boolean),w="yes"==a.getItem("whatsappme_visited"),f=h?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():"no_cta",_=d.indexOf(f)>-1;if(a.setItem("whatsappme_visited","yes"),!o.mobile_only||c){var b="whatsappme--show";_||h&&r&&!o.message_badge&&w||(b+=" whatsappme--tooltip"),setTimeout(function(){n.addClass(b)},m),h&&!_&&r&&(o.message_badge?p=setTimeout(function(){s.addClass("whatsappme__badge--in")},m+r):w&&(p=setTimeout(v,m+r)))}h&&!c&&e(".whatsappme__button",n).mouseenter(function(){g||(i=setTimeout(v,1500))}).mouseleave(function(){clearTimeout(i)});function v(){n.addClass("whatsappme--dialog"),g=!0,clearTimeout(p),o.message_badge&&s.hasClass("whatsappme__badge--in")&&s.toggleClass("whatsappme__badge--in whatsappme__badge--out"),e(document).trigger("whatsappme:show")}function A(){n.removeClass("whatsappme--dialog whatsappme--tooltip"),g=!1,_||(d.push(f),a.setItem("whatsappme_hashes",d.join(",")),_=!0),e(document).trigger("whatsappme:hide")}e(".whatsappme__button",n).click(function(){if(h&&!g)v();else{var a={link:t(l,o.telephone,o.message_send)},n=new RegExp("^https?://(wa.me|(api|web|chat).whatsapp.com|"+location.hostname.replace(".",".")+")/.*","i");g&&A(),e(document).trigger("whatsappme:open",[a,o]),n.test(a.link)?(!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&&"function"==typeof ga.getAll){ga("set","transport","beacon");var t=ga.getAll();t.forEach(function(t){t.send("event","WhatsAppMe","click",e)})}"function"==typeof fbq&&fbq("trackCustom","WhatsAppMe",{eventAction:"click",eventLabel:e})}(a.link),window.open(a.link,"whatsappme")):console.error("WAme: the link doesn't seem safe, it must point to the current domain or whatsapp.com")}}),e(".whatsappme__close",n).click(A)}()}),Math.imul=Math.imul||function(e,t){var a=65535&e,n=65535&t;return a*n+((e>>>16&65535)*n+a*(t>>>16&65535)<<16>>>0)|0}}(jQuery);
1
+ !function(e,t){"use strict";Math.imul=Math.imul||function(e,t){var a=65535&e,i=65535&t;return a*i+((e>>>16&65535)*i+a*(t>>>16&65535)<<16>>>0)|0},t.wame_public=t.wame_public||{},wame_public=e.extend({$wame:null,$badge:null,settings:null,store:null,chatbox:!1,is_mobile:!1},wame_public),wame_public.send_event=function(e){if("object"==typeof dataLayer&&dataLayer.push({event:"WhatsAppMe",eventAction:"click",eventLabel:e}),"function"==typeof gtag)gtag("event","click",{event_category:"WhatsAppMe",event_label:e,transport_type:"beacon"});else if("function"==typeof ga&&"function"==typeof ga.getAll){ga("set","transport","beacon"),ga.getAll().forEach(function(t){t.send("event","WhatsAppMe","click",e)})}"function"==typeof fbq&&fbq("trackCustom","WhatsAppMe",{eventAction:"click",eventLabel:e})},wame_public.hash=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},wame_public.whatsapp_link=function(e,t,a){return((a=void 0!==a?a:wame_public.settings.whatsapp_web&&!wame_public.is_mobile)?"https://web.whatsapp.com/send":"https://api.whatsapp.com/send")+"?phone="+encodeURIComponent(e)+"&text="+encodeURIComponent(t||"")},wame_public.chatbox_show=function(){wame_public.$wame.addClass("whatsappme--chatbox"),wame_public.chatbox=!0,wame_public.settings.message_badge&&wame_public.$badge.hasClass("whatsappme__badge--in")&&wame_public.$badge.toggleClass("whatsappme__badge--in whatsappme__badge--out"),e(document).trigger("whatsappme:show")},wame_public.chatbox_hide=function(){wame_public.$wame.removeClass("whatsappme--chatbox whatsappme--tooltip"),wame_public.chatbox=!1,e(document).trigger("whatsappme:hide")},wame_public.save_hash=function(e){var t=(wame_public.store.getItem("whatsappme_hashes")||"").split(",").filter(Boolean);-1==t.indexOf(e)&&(t.push(e),wame_public.store.setItem("whatsappme_hashes",t.join(",")))},e(function(){wame_public.$wame=e(".whatsappme"),wame_public.$badge=wame_public.$wame.find(".whatsappme__badge"),wame_public.settings=wame_public.$wame.data("settings"),wame_public.is_mobile=!!navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i);try{localStorage.setItem("test",1),localStorage.removeItem("test"),wame_public.store=localStorage}catch(e){wame_public.store={_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===wame_public.settings)try{wame_public.settings=JSON.parse(wame_public.$wame.attr("data-settings"))}catch(e){wame_public.settings=void 0}wame_public.$wame.length&&wame_public.settings&&wame_public.settings.telephone&&function(){var a,i,s=1e3*wame_public.settings.button_delay,n=1e3*wame_public.settings.message_delay,p=!!wame_public.settings.message_text,o=(wame_public.store.getItem("whatsappme_hashes")||"").split(",").filter(Boolean),l="yes"==wame_public.store.getItem("whatsappme_visited"),m=p?wame_public.hash(wame_public.settings.message_text).toString():"no_cta",c=o.indexOf(m)>-1;function u(){clearTimeout(i),wame_public.chatbox_show()}function w(){wame_public.save_hash(m),wame_public.chatbox_hide()}if(wame_public.store.setItem("whatsappme_visited","yes"),!wame_public.settings.mobile_only||wame_public.is_mobile){var _="whatsappme--show";c||p&&n&&!wame_public.settings.message_badge&&l||(_+=" whatsappme--tooltip"),setTimeout(function(){wame_public.$wame.addClass(_)},s),p&&!c&&n&&(wame_public.settings.message_badge?i=setTimeout(function(){wame_public.$badge.addClass("whatsappme__badge--in")},s+n):l&&(i=setTimeout(u,s+n)))}p&&!wame_public.is_mobile&&e(".whatsappme__button",wame_public.$wame).mouseenter(function(){wame_public.chatbox||(a=setTimeout(u,1500))}).mouseleave(function(){clearTimeout(a)});if(e(".whatsappme__button",wame_public.$wame).click(function(){if(p&&!wame_public.chatbox)u();else{var a={link:wame_public.whatsapp_link(wame_public.settings.telephone,wame_public.settings.message_send)},i=new RegExp("^https?://(wa.me|(api|web|chat).whatsapp.com|"+location.hostname.replace(".",".")+")/.*","i");wame_public.chatbox&&w(),e(document).trigger("whatsappme:open",[a,wame_public.settings]),i.test(a.link)?(wame_public.send_event(a.link),t.open(a.link,"whatsappme")):console.error("WAme: the link doesn't seem safe, it must point to the current domain or whatsapp.com")}}),e(".whatsappme__close",wame_public.$wame).click(w),e(".whatsappme__box__scroll").on("mousewheel DOMMouseScroll",function(e){e.preventDefault();var t=e.originalEvent.wheelDelta||-e.originalEvent.detail;this.scrollTop+=30*(t<0?1:-1)}),wame_public.is_mobile){var b,h=t.innerHeight;e(document).on("focus blur","input, textarea",function(){clearTimeout(b),b=setTimeout(function(){wame_public.$wame.toggleClass("whatsappme--show",.7*h<t.innerHeight)},800)})}e(document).trigger("whatsappme:start")}()})}(jQuery,window);
whatsappme.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: VVAme chat
10
  * Plugin URI: https://wame.chat
11
  * Description: Connects a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
12
- * Version: 3.1.4
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', '3.1.4' );
31
 
32
  /**
33
  * The core plugin class that is used to define internationalization,
9
  * Plugin Name: VVAme chat
10
  * Plugin URI: https://wame.chat
11
  * Description: Connects a WordPress chat with WhatsApp. The best solution for marketing and support. Stop losing customers and increase your sales.
12
+ * Version: 3.2.0
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', '3.2.0' );
31
 
32
  /**
33
  * The core plugin class that is used to define internationalization,