WhatsApp me - Version 4.1.13

Version Description

  • NEW: Add Thank you page in WooCommerce visibility options.
  • SECURE frontend escape html output.
Download this release

Release Info

Developer pacotole
Plugin Icon 128x128 WhatsApp me
Version 4.1.13
Comparing to
See all releases

Code changes from version 4.1.12 to 4.1.13

README.txt CHANGED
@@ -5,7 +5,7 @@ Tags: whatsapp business, whatsapp, click to chat, button, whatsapp support chat,
5
  Requires at least: 3.5.0
6
  Tested up to: 5.7
7
  Requires PHP: 5.3
8
- Stable tag: 4.1.12
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
@@ -217,6 +217,10 @@ There is a Javascript event that Join.chat triggers automatically before launch
217
 
218
  == Changelog ==
219
 
 
 
 
 
220
  = 4.1.12 =
221
  * **NEW:** Add integration with Elementor Finder.
222
  * **NEW:** Add compatibility with Storefront theme mobile toolbar.
5
  Requires at least: 3.5.0
6
  Tested up to: 5.7
7
  Requires PHP: 5.3
8
+ Stable tag: 4.1.13
9
  License: GPLv2 or later
10
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
11
 
217
 
218
  == Changelog ==
219
 
220
+ = 4.1.13 =
221
+ * **NEW:** Add Thank you page in WooCommerce visibility options.
222
+ * **SECURE** frontend escape html output.
223
+
224
  = 4.1.12 =
225
  * **NEW:** Add integration with Elementor Finder.
226
  * **NEW:** Add compatibility with Storefront theme mobile toolbar.
admin/class-joinchat-woo-admin.php CHANGED
@@ -129,6 +129,7 @@ class JoinChatWooAdmin {
129
  'view__product' => '— ' . __( 'Product Page', 'creame-whatsapp-me' ),
130
  'view__cart' => '— ' . __( 'Cart', 'creame-whatsapp-me' ),
131
  'view__checkout' => '— ' . __( 'Checkout', 'creame-whatsapp-me' ),
 
132
  'view__account_page' => '— ' . __( 'My Account', 'creame-whatsapp-me' ),
133
  );
134
 
@@ -256,7 +257,7 @@ class JoinChatWooAdmin {
256
  // 'woocommerce' inherit from 'all' (Global)
257
  $inheritance['all'][] = 'woocommerce';
258
  // WooCommerce pages inherit from 'woocommerce'
259
- $inheritance['woocommerce'] = array( 'product', 'cart', 'checkout', 'account_page' );
260
 
261
  return $inheritance;
262
  }
129
  'view__product' => '— ' . __( 'Product Page', 'creame-whatsapp-me' ),
130
  'view__cart' => '— ' . __( 'Cart', 'creame-whatsapp-me' ),
131
  'view__checkout' => '— ' . __( 'Checkout', 'creame-whatsapp-me' ),
132
+ 'view__thankyou' => '— ' . __( 'Thank you', 'creame-whatsapp-me' ),
133
  'view__account_page' => '— ' . __( 'My Account', 'creame-whatsapp-me' ),
134
  );
135
 
257
  // 'woocommerce' inherit from 'all' (Global)
258
  $inheritance['all'][] = 'woocommerce';
259
  // WooCommerce pages inherit from 'woocommerce'
260
+ $inheritance['woocommerce'] = array( 'product', 'cart', 'checkout', 'thankyou', 'account_page' );
261
 
262
  return $inheritance;
263
  }
joinchat.php CHANGED
@@ -9,7 +9,7 @@
9
  * Plugin Name: Join.chat
10
  * Plugin URI: https://join.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: 4.1.12
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
@@ -26,7 +26,7 @@ if ( ! defined( 'WPINC' ) ) {
26
  /**
27
  * Currently plugin version.
28
  */
29
- define( 'JOINCHAT_VERSION', '4.1.12' );
30
 
31
  /**
32
  * The core plugin class that is used to define internationalization,
9
  * Plugin Name: Join.chat
10
  * Plugin URI: https://join.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: 4.1.13
13
  * Author: Creame
14
  * Author URI: https://crea.me
15
  * License: GPL-2.0+
26
  /**
27
  * Currently plugin version.
28
  */
29
+ define( 'JOINCHAT_VERSION', '4.1.13' );
30
 
31
  /**
32
  * The core plugin class that is used to define internationalization,
languages/creame-whatsapp-me.pot CHANGED
@@ -2,7 +2,7 @@
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Join.chat\n"
5
- "POT-Creation-Date: 2021-04-12 16:26+0000\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,7 +21,7 @@ msgstr ""
21
  "X-Poedit-SearchPath-0: .\n"
22
  "Language: "
23
 
24
- #: admin/class-joinchat-woo-admin.php:237
25
  msgid ""
26
  "*Hi {SITE}!*\n"
27
  "I have a question about *{PRODUCT} ({SKU})*"
@@ -31,7 +31,7 @@ msgstr ""
31
  msgid "404 Page"
32
  msgstr ""
33
 
34
- #: admin/class-joinchat-woo-admin.php:274
35
  msgid "<strong>WooCommerce</strong>, in product pages you can also use:"
36
  msgstr ""
37
 
@@ -85,11 +85,11 @@ msgstr ""
85
  msgid "Call to Action"
86
  msgstr ""
87
 
88
- #: admin/class-joinchat-woo-admin.php:148
89
  msgid "Call to Action for Products"
90
  msgstr ""
91
 
92
- #: admin/class-joinchat-woo-admin.php:149
93
  msgid "Call to Action for Products on Sale"
94
  msgstr ""
95
 
@@ -165,12 +165,12 @@ msgstr ""
165
  msgid "Default visibility"
166
  msgstr ""
167
 
168
- #: admin/class-joinchat-woo-admin.php:232
169
  msgid ""
170
  "Define a text for your products on sale to encourage customers to contact"
171
  msgstr ""
172
 
173
- #: admin/class-joinchat-woo-admin.php:225
174
  msgid "Define a text for your products to encourage customers to contact"
175
  msgstr ""
176
 
@@ -206,7 +206,7 @@ msgstr ""
206
  msgid "Follow %s on twitter."
207
  msgstr ""
208
 
209
- #: admin/class-joinchat-woo-admin.php:280
210
  msgid ""
211
  "For the <strong>Call to Action for Products on Sale</strong>, you can also "
212
  "use:"
@@ -328,7 +328,7 @@ msgstr ""
328
  msgid "Message"
329
  msgstr ""
330
 
331
- #: admin/class-joinchat-woo-admin.php:150
332
  msgid "Message for Products"
333
  msgstr ""
334
 
@@ -336,7 +336,7 @@ msgstr ""
336
  msgid "Mobile Only"
337
  msgstr ""
338
 
339
- #: admin/class-joinchat-woo-admin.php:132
340
  msgid "My Account"
341
  msgstr ""
342
 
@@ -403,7 +403,7 @@ msgstr ""
403
  msgid "Powered by Join.chat"
404
  msgstr ""
405
 
406
- #: admin/class-joinchat-woo-admin.php:239
407
  msgid "Predefined text for the first message the client will send you"
408
  msgstr ""
409
 
@@ -411,11 +411,11 @@ msgstr ""
411
  msgid "Predefined text for the first message the user will send you"
412
  msgstr ""
413
 
414
- #: admin/class-joinchat-woo-admin.php:197
415
  msgid "Product Chat Window"
416
  msgstr ""
417
 
418
- #: admin/class-joinchat-woo-admin.php:276
419
  msgid "Product Name"
420
  msgstr ""
421
 
@@ -435,7 +435,7 @@ msgstr ""
435
  msgid "Right"
436
  msgstr ""
437
 
438
- #: admin/class-joinchat-woo-admin.php:230
439
  msgid ""
440
  "Save {DISCOUNT}! This *{PRODUCT}* can be yours for only ~{REGULAR}~ *{PRICE}"
441
  "*.\n"
@@ -518,6 +518,10 @@ msgstr ""
518
  msgid "Text to open chat on Chat Window button"
519
  msgstr ""
520
 
 
 
 
 
521
  #: admin/class-joinchat-admin.php:558
522
  msgid "The image will alternate with button icon"
523
  msgstr ""
@@ -526,7 +530,7 @@ msgstr ""
526
  msgid "Theme Color"
527
  msgstr ""
528
 
529
- #: admin/class-joinchat-woo-admin.php:223
530
  msgid ""
531
  "This *{PRODUCT}* can be yours for only *{PRICE}*!\n"
532
  "If you have any questions, ask us."
@@ -614,7 +618,7 @@ msgstr ""
614
  msgid "With anchor links:"
615
  msgstr ""
616
 
617
- #: admin/class-joinchat-woo-admin.php:193
618
  msgid "WooCommerce"
619
  msgstr ""
620
 
@@ -622,7 +626,7 @@ msgstr ""
622
  msgid "Yes"
623
  msgstr ""
624
 
625
- #: admin/class-joinchat-woo-admin.php:199
626
  msgid ""
627
  "You can define other different texts for the Chat Window on the product "
628
  "pages."
2
  msgid ""
3
  msgstr ""
4
  "Project-Id-Version: Join.chat\n"
5
+ "POT-Creation-Date: 2021-05-17 14:43+0000\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-Poedit-SearchPath-0: .\n"
22
  "Language: "
23
 
24
+ #: admin/class-joinchat-woo-admin.php:238
25
  msgid ""
26
  "*Hi {SITE}!*\n"
27
  "I have a question about *{PRODUCT} ({SKU})*"
31
  msgid "404 Page"
32
  msgstr ""
33
 
34
+ #: admin/class-joinchat-woo-admin.php:275
35
  msgid "<strong>WooCommerce</strong>, in product pages you can also use:"
36
  msgstr ""
37
 
85
  msgid "Call to Action"
86
  msgstr ""
87
 
88
+ #: admin/class-joinchat-woo-admin.php:149
89
  msgid "Call to Action for Products"
90
  msgstr ""
91
 
92
+ #: admin/class-joinchat-woo-admin.php:150
93
  msgid "Call to Action for Products on Sale"
94
  msgstr ""
95
 
165
  msgid "Default visibility"
166
  msgstr ""
167
 
168
+ #: admin/class-joinchat-woo-admin.php:233
169
  msgid ""
170
  "Define a text for your products on sale to encourage customers to contact"
171
  msgstr ""
172
 
173
+ #: admin/class-joinchat-woo-admin.php:226
174
  msgid "Define a text for your products to encourage customers to contact"
175
  msgstr ""
176
 
206
  msgid "Follow %s on twitter."
207
  msgstr ""
208
 
209
+ #: admin/class-joinchat-woo-admin.php:281
210
  msgid ""
211
  "For the <strong>Call to Action for Products on Sale</strong>, you can also "
212
  "use:"
328
  msgid "Message"
329
  msgstr ""
330
 
331
+ #: admin/class-joinchat-woo-admin.php:151
332
  msgid "Message for Products"
333
  msgstr ""
334
 
336
  msgid "Mobile Only"
337
  msgstr ""
338
 
339
+ #: admin/class-joinchat-woo-admin.php:133
340
  msgid "My Account"
341
  msgstr ""
342
 
403
  msgid "Powered by Join.chat"
404
  msgstr ""
405
 
406
+ #: admin/class-joinchat-woo-admin.php:240
407
  msgid "Predefined text for the first message the client will send you"
408
  msgstr ""
409
 
411
  msgid "Predefined text for the first message the user will send you"
412
  msgstr ""
413
 
414
+ #: admin/class-joinchat-woo-admin.php:198
415
  msgid "Product Chat Window"
416
  msgstr ""
417
 
418
+ #: admin/class-joinchat-woo-admin.php:277
419
  msgid "Product Name"
420
  msgstr ""
421
 
435
  msgid "Right"
436
  msgstr ""
437
 
438
+ #: admin/class-joinchat-woo-admin.php:231
439
  msgid ""
440
  "Save {DISCOUNT}! This *{PRODUCT}* can be yours for only ~{REGULAR}~ *{PRICE}"
441
  "*.\n"
518
  msgid "Text to open chat on Chat Window button"
519
  msgstr ""
520
 
521
+ #: admin/class-joinchat-woo-admin.php:132
522
+ msgid "Thank you"
523
+ msgstr ""
524
+
525
  #: admin/class-joinchat-admin.php:558
526
  msgid "The image will alternate with button icon"
527
  msgstr ""
530
  msgid "Theme Color"
531
  msgstr ""
532
 
533
+ #: admin/class-joinchat-woo-admin.php:224
534
  msgid ""
535
  "This *{PRODUCT}* can be yours for only *{PRICE}*!\n"
536
  "If you have any questions, ask us."
618
  msgid "With anchor links:"
619
  msgstr ""
620
 
621
+ #: admin/class-joinchat-woo-admin.php:194
622
  msgid "WooCommerce"
623
  msgstr ""
624
 
626
  msgid "Yes"
627
  msgstr ""
628
 
629
+ #: admin/class-joinchat-woo-admin.php:200
630
  msgid ""
631
  "You can define other different texts for the Chat Window on the product "
632
  "pages."
public/class-joinchat-woo-public.php CHANGED
@@ -126,10 +126,15 @@ class JoinChatWooPublic {
126
  }
127
 
128
  // Checkout page
129
- if ( is_checkout() ) {
130
  return isset( $options['checkout'] ) ? 'yes' == $options['checkout'] : $woo;
131
  }
132
 
 
 
 
 
 
133
  // Customer account pages
134
  if ( is_account_page() ) {
135
  return isset( $options['account_page'] ) ? 'yes' == $options['account_page'] : $woo;
126
  }
127
 
128
  // Checkout page
129
+ if ( is_checkout() && ! is_wc_endpoint_url() ) {
130
  return isset( $options['checkout'] ) ? 'yes' == $options['checkout'] : $woo;
131
  }
132
 
133
+ // Thankyou page
134
+ if ( is_wc_endpoint_url( 'order-received' ) ) {
135
+ return isset( $options['thankyou'] ) ? 'yes' == $options['thankyou'] : $woo;
136
+ }
137
+
138
  // Customer account pages
139
  if ( is_account_page() ) {
140
  return isset( $options['account_page'] ) ? 'yes' == $options['account_page'] : $woo;
public/partials/html.php CHANGED
@@ -12,14 +12,14 @@
12
  defined( 'WPINC' ) || exit;
13
  ?>
14
 
15
- <div class="joinchat <?php echo apply_filters( 'joinchat_classes', $joinchat_classes ); ?>" data-settings='<?php echo JoinChatUtil::to_json( $data ); ?>'>
16
  <div class="joinchat__button">
17
  <div class="joinchat__button__open"></div>
18
  <?php if ( $image ) : ?>
19
  <div class="joinchat__button__image"><?php echo $image; ?></div>
20
  <?php endif; ?>
21
  <?php if ( $this->settings['message_start'] ) : ?>
22
- <div class="joinchat__button__sendtext"><?php echo $this->settings['message_start']; ?></div>
23
  <?php endif; ?>
24
  <?php if ( $box_content ) : ?>
25
  <svg class="joinchat__button__send" viewbox="0 0 400 400" stroke-linecap="round" stroke-width="33">
@@ -31,7 +31,7 @@ defined( 'WPINC' ) || exit;
31
  <div class="joinchat__badge">1</div>
32
  <?php endif; ?>
33
  <?php if ( $this->settings['button_tip'] ) : ?>
34
- <div class="joinchat__tooltip"><div><?php echo $this->settings['button_tip']; ?></div></div>
35
  <?php endif; ?>
36
  </div>
37
  <?php if ( $box_content ) : ?>
@@ -44,7 +44,7 @@ defined( 'WPINC' ) || exit;
44
  <?php elseif ( '__wa__' === $this->settings['header'] ) : ?>
45
  <svg class="joinchat__wa" viewBox="0 0 120 28"><title>WhatsApp</title><path 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.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.2A20 20 0 0 1 16 17c-.2.2-.4.3-.7.1-.4-.2-1.5-.5-2.8-1.7-1-1-1.7-2-2-2.4-.1-.4 0-.5.2-.7l.5-.6.4-.6v-.6L10.4 8c-.3-.6-.6-.5-.8-.6H9c-.2 0-.6.1-.9.5C7.8 8.2 7 9 7 10.7c0 1.7 1.3 3.4 1.4 3.6.2.3 2.5 3.7 6 5.2l1.9.8c.8.2 1.6.2 2.2.1.6-.1 2-.8 2.3-1.6.3-.9.3-1.5.2-1.7l-.7-.4zM14 25.3c-2 0-4-.5-5.8-1.6l-.4-.2-4.4 1.1 1.2-4.2-.3-.5A11.5 11.5 0 0 1 22.1 5.7 11.5 11.5 0 0 1 14 25.3zM14 0A13.8 13.8 0 0 0 2 20.7L0 28l7.3-2A13.8 13.8 0 1 0 14 0z"/></svg>
46
  <?php elseif ( '' !== $this->settings['header'] ) : ?>
47
- <span class="joinchat__header__text"><?php echo $this->settings['header']; ?></span>
48
  <?php endif; ?>
49
  <div class="joinchat__close" aria-label="<?php _e( 'Close', 'creame-whatsapp-me' ); ?>"></div>
50
  </div>
12
  defined( 'WPINC' ) || exit;
13
  ?>
14
 
15
+ <div class="joinchat <?php echo esc_attr( apply_filters( 'joinchat_classes', $joinchat_classes ) ); ?>" data-settings='<?php echo JoinChatUtil::to_json( $data ); ?>'>
16
  <div class="joinchat__button">
17
  <div class="joinchat__button__open"></div>
18
  <?php if ( $image ) : ?>
19
  <div class="joinchat__button__image"><?php echo $image; ?></div>
20
  <?php endif; ?>
21
  <?php if ( $this->settings['message_start'] ) : ?>
22
+ <div class="joinchat__button__sendtext"><?php echo esc_html( $this->settings['message_start'] ); ?></div>
23
  <?php endif; ?>
24
  <?php if ( $box_content ) : ?>
25
  <svg class="joinchat__button__send" viewbox="0 0 400 400" stroke-linecap="round" stroke-width="33">
31
  <div class="joinchat__badge">1</div>
32
  <?php endif; ?>
33
  <?php if ( $this->settings['button_tip'] ) : ?>
34
+ <div class="joinchat__tooltip"><div><?php echo esc_html( $this->settings['button_tip'] ); ?></div></div>
35
  <?php endif; ?>
36
  </div>
37
  <?php if ( $box_content ) : ?>
44
  <?php elseif ( '__wa__' === $this->settings['header'] ) : ?>
45
  <svg class="joinchat__wa" viewBox="0 0 120 28"><title>WhatsApp</title><path 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.2-8.2l-5 13.4h3l1-3h5l1 3h3L94 7.3h-3zm-5.3 9.1l-.6-.8-1-.5a11.6 11.6 0 0 0-2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 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"/></svg>
46
  <?php elseif ( '' !== $this->settings['header'] ) : ?>
47
+ <span class="joinchat__header__text"><?php echo esc_html( $this->settings['header'] ); ?></span>
48
  <?php endif; ?>
49
  <div class="joinchat__close" aria-label="<?php _e( 'Close', 'creame-whatsapp-me' ); ?>"></div>
50
  </div>
public/partials/script.php CHANGED
@@ -16,8 +16,7 @@ defined( 'WPINC' ) || exit;
16
  jQuery(function($){
17
  var arg = <?php echo JoinChatUtil::to_json( $args ); ?>;
18
  var via = arg.web && !navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i) ? 'web' : 'api';
19
- $(document).on('click', '.joinchat_open,.joinchat_app,a[href="#whatsapp"],a[href="#joinchat"]', function(e){
20
- e.preventDefault();
21
  window.open('https://' + via + '.whatsapp.com/send?phone=' + encodeURIComponent(arg.tel) + '&text=' + encodeURIComponent(arg.msg), null, 'noopener');
22
  });
23
  });
16
  jQuery(function($){
17
  var arg = <?php echo JoinChatUtil::to_json( $args ); ?>;
18
  var via = arg.web && !navigator.userAgent.match(/Android|iPhone|BlackBerry|IEMobile|Opera Mini/i) ? 'web' : 'api';
19
+ $(document).on('click', '.joinchat_open,.joinchat_app,a[href="#whatsapp"],a[href="#joinchat"]', function(e){ e.preventDefault();
 
20
  window.open('https://' + via + '.whatsapp.com/send?phone=' + encodeURIComponent(arg.tel) + '&text=' + encodeURIComponent(arg.msg), null, 'noopener');
21
  });
22
  });