Version Description
- FIX Google Ads conversion field is too short.
Download this release
Release Info
Developer | pacotole |
Plugin | WhatsApp me |
Version | 4.4.1 |
Comparing to | |
See all releases |
Code changes from version 4.4.0 to 4.4.1
- README.txt +6 -3
- admin/class-joinchat-admin.php +5 -4
- admin/js/joinchat.js +9 -0
- admin/js/joinchat.min.js +1 -1
- joinchat.php +2 -2
README.txt
CHANGED
@@ -5,7 +5,7 @@ Tags: Chat, Click to Chat, Facebook Messenger, WhatsApp, Telegram, Whatsapp Busi
|
|
5 |
Requires at least: 3.5.0
|
6 |
Tested up to: 5.9
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 4.4.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -20,7 +20,7 @@ WhatsApp, Messenger, Telegram, Phone call… capture users through their favorit
|
|
20 |
|
21 |
https://www.youtube.com/watch?v=Ad2ZpPnX_3Q
|
22 |
|
23 |
-
[Documentation](https://join.chat/en/docs/?utm_source=wporg&utm_medium=web&utm_campaign=v4_4) | [
|
24 |
|
25 |
### ⌁ What you can do with Join.chat (formerly WAme) ✅
|
26 |
|
@@ -329,6 +329,9 @@ Join.chat save two localStorage variables for proper operation:
|
|
329 |
|
330 |
== Changelog ==
|
331 |
|
|
|
|
|
|
|
332 |
= 4.4 =
|
333 |
* **NEW: Display QR Code on desktop** to scan with phone.
|
334 |
* **NEW: Opt-in** text for user consent (optional or required).
|
@@ -340,7 +343,7 @@ Join.chat save two localStorage variables for proper operation:
|
|
340 |
* **TIP:** Easier configuration, double click to apply the example settings in placeholders.
|
341 |
* CHANGED default z-index is `9999`.
|
342 |
* CHANGED allow set empty CTA for products with `{}` in main settings.
|
343 |
-
* **CHANGED** GA4 custom 'JoinChat' event now is 'generate_lead'
|
344 |
|
345 |
= 4.3.2 =
|
346 |
* Styles minor improvements, fix tooltip align.
|
5 |
Requires at least: 3.5.0
|
6 |
Tested up to: 5.9
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 4.4.1
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
20 |
|
21 |
https://www.youtube.com/watch?v=Ad2ZpPnX_3Q
|
22 |
|
23 |
+
[Documentation](https://join.chat/en/docs/?utm_source=wporg&utm_medium=web&utm_campaign=v4_4) | [Premium](https://join.chat/en/premium/?utm_source=wporg&utm_medium=web&utm_campaign=v4_4) | [Support](https://join.chat/en/support/?utm_source=wporg&utm_medium=web&utm_campaign=v4_4)
|
24 |
|
25 |
### ⌁ What you can do with Join.chat (formerly WAme) ✅
|
26 |
|
329 |
|
330 |
== Changelog ==
|
331 |
|
332 |
+
= 4.4.1 =
|
333 |
+
* FIX Google Ads conversion field is too short.
|
334 |
+
|
335 |
= 4.4 =
|
336 |
* **NEW: Display QR Code on desktop** to scan with phone.
|
337 |
* **NEW: Opt-in** text for user consent (optional or required).
|
343 |
* **TIP:** Easier configuration, double click to apply the example settings in placeholders.
|
344 |
* CHANGED default z-index is `9999`.
|
345 |
* CHANGED allow set empty CTA for products with `{}` in main settings.
|
346 |
+
* **CHANGED** GA4 custom 'JoinChat' event now is 'generate_lead' recommended event.
|
347 |
|
348 |
= 4.3.2 =
|
349 |
* Styles minor improvements, fix tooltip align.
|
admin/class-joinchat-admin.php
CHANGED
@@ -306,7 +306,7 @@ class JoinChatAdmin {
|
|
306 |
'optin_check' => __( 'Opt-in Required', 'creame-whatsapp-me' ),
|
307 |
),
|
308 |
'conversion' => array(
|
309 |
-
'gads' => __( 'Google Ads Conversion', 'creame-whatsapp-me' ),
|
310 |
),
|
311 |
);
|
312 |
|
@@ -361,7 +361,7 @@ class JoinChatAdmin {
|
|
361 |
$input['position'] = $input['position'] != 'left' ? 'right' : 'left';
|
362 |
$input['color'] = preg_match( '/^#[a-f0-9]{6}$/i', $input['color'] ) ? $input['color'] : '#25d366';
|
363 |
$input['dark_mode'] = in_array( $input['dark_mode'], array( 'no', 'yes', 'auto' ) ) ? $input['dark_mode'] : 'no';
|
364 |
-
$input['header'] = in_array( $input['header'], array( '__jc__', '__wa__' ) ) ? $input['header'] : $util::clean_input( $input['header_custom'] );
|
365 |
$input['optin_check'] = isset( $input['optin_check'] ) ? 'yes' : 'no';
|
366 |
$input['optin_text'] = wp_kses(
|
367 |
$input['optin_text'],
|
@@ -371,7 +371,7 @@ class JoinChatAdmin {
|
|
371 |
'a' => array( 'href' => true ),
|
372 |
)
|
373 |
);
|
374 |
-
$input['gads'] = $util::clean_input( $input['gads'] );
|
375 |
|
376 |
if ( isset( $input['view'] ) ) {
|
377 |
$input['visibility'] = array_filter(
|
@@ -681,7 +681,8 @@ class JoinChatAdmin {
|
|
681 |
break;
|
682 |
|
683 |
case 'gads':
|
684 |
-
$output = '<input id="joinchat_gads" name="joinchat[gads]" value="' . esc_attr( $value ) . '" type="text" maxlength="
|
|
|
685 |
'<p class="description">' . __( 'Send the conversion automatically at the chat start', 'creame-whatsapp-me' ) . '</p>';
|
686 |
break;
|
687 |
|
306 |
'optin_check' => __( 'Opt-in Required', 'creame-whatsapp-me' ),
|
307 |
),
|
308 |
'conversion' => array(
|
309 |
+
'gads' => '<label for="joinchat_gads">' . __( 'Google Ads Conversion', 'creame-whatsapp-me' ) . '</label>',
|
310 |
),
|
311 |
);
|
312 |
|
361 |
$input['position'] = $input['position'] != 'left' ? 'right' : 'left';
|
362 |
$input['color'] = preg_match( '/^#[a-f0-9]{6}$/i', $input['color'] ) ? $input['color'] : '#25d366';
|
363 |
$input['dark_mode'] = in_array( $input['dark_mode'], array( 'no', 'yes', 'auto' ) ) ? $input['dark_mode'] : 'no';
|
364 |
+
$input['header'] = in_array( $input['header'], array( '__jc__', '__wa__' ) ) ? $input['header'] : $util::substr( $util::clean_input( $input['header_custom'] ), 0, 40 );
|
365 |
$input['optin_check'] = isset( $input['optin_check'] ) ? 'yes' : 'no';
|
366 |
$input['optin_text'] = wp_kses(
|
367 |
$input['optin_text'],
|
371 |
'a' => array( 'href' => true ),
|
372 |
)
|
373 |
);
|
374 |
+
$input['gads'] = $util::substr( $util::clean_input( $input['gads'] ), 0, 40 );
|
375 |
|
376 |
if ( isset( $input['view'] ) ) {
|
377 |
$input['visibility'] = array_filter(
|
681 |
break;
|
682 |
|
683 |
case 'gads':
|
684 |
+
$output = '<input id="joinchat_gads" name="joinchat[gads]" value="' . esc_attr( $value ) . '" type="text" maxlength="40" class="regular-text" ' .
|
685 |
+
'placeholder="' . esc_attr__( 'AW-CONVERSION_ID/CONVERSION_LABEL', 'creame-whatsapp-me' ) . '" title="' . esc_attr__( 'AW-CONVERSION_ID/CONVERSION_LABEL', 'creame-whatsapp-me' ) . '"> ' .
|
686 |
'<p class="description">' . __( 'Send the conversion automatically at the chat start', 'creame-whatsapp-me' ) . '</p>';
|
687 |
break;
|
688 |
|
admin/js/joinchat.js
CHANGED
@@ -207,6 +207,15 @@
|
|
207 |
$('#joinchat_woo_btn_position').on('change', function () {
|
208 |
$('#joinchat_woo_btn_text').closest('tr').toggleClass('joinchat-hidden', $(this).val() == 'none');
|
209 |
}).trigger('change');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
}
|
211 |
|
212 |
if ($('.joinchat-metabox').length) {
|
207 |
$('#joinchat_woo_btn_position').on('change', function () {
|
208 |
$('#joinchat_woo_btn_text').closest('tr').toggleClass('joinchat-hidden', $(this).val() == 'none');
|
209 |
}).trigger('change');
|
210 |
+
|
211 |
+
// Google Ads format validate
|
212 |
+
$('#joinchat_gads').on('focus', function () {
|
213 |
+
if ('' == $(this).val()) $(this).val('AW-_________/____________________');
|
214 |
+
}).on('input focus', function () {
|
215 |
+
$(this).css('color', !/^AW-\d{9}\/\w{19,22}$/.test($(this).val().trim()) ? '#ca4a1f' : '');
|
216 |
+
}).on('blur', function () {
|
217 |
+
if ('AW-_________/____________________' == $(this).val()) $(this).val('');
|
218 |
+
});
|
219 |
}
|
220 |
|
221 |
if ($('.joinchat-metabox').length) {
|
admin/js/joinchat.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(h){"use strict";function r(){h(this).height(0).height(this.scrollHeight)}window.intl_tel_input_version=window.intlTelConf&&intlTelConf.version,h(function(){var n,t,i,e,a,o,c,l;function s(t,e){var n;t=t||"all",e=e||h('input[name="joinchat[view]['+t+']"]:checked').val(),h(".view_inheritance_"+t).toggleClass("dashicons-visibility","yes"==e).toggleClass("dashicons-hidden","no"==e),"cpts"==t?h("[class*=view_inheritance_cpt_]").toggleClass("dashicons-visibility","yes"==e).toggleClass("dashicons-hidden","no"==e):t in l&&(n=""===(n=h('input[name="joinchat[view]['+t+']"]:checked').val())?e:n,h.each(l[t],function(){s(this,n)}))}"function"==typeof intlTelInput&&h("#joinchat_phone").length&&(t=JSON.parse(localStorage.joinchat_country_code||"{}"),i=!(!t.code||t.date!=(new Date).toDateString())&&t.code,e=h("#joinchat_phone"),a=""===e.val()?e.attr("placeholder"):null,e.removeAttr("placeholder"),(o=intlTelInput(e.get(0),{hiddenInput:e.data("name")||"joinchat[telephone]",initialCountry:"auto",preferredCountries:[i||""],geoIpLookup:function(e){i?e(i):h.getJSON("https://ipinfo.io").always(function(t){t=t&&t.country?t.country:"";localStorage.joinchat_country_code=JSON.stringify({code:t,date:(new Date).toDateString()}),e(t)})},customPlaceholder:function(t){return intlTelConf.placeholder+" "+t},utilsScript:intlTelConf.utils_js})).hiddenInput.value=e.val(),"string"==typeof a&&""!=a&&o.promise.then(function(){o.setNumber(a),e.attr("placeholder",o.getNumber(intlTelInputUtils.numberFormat.NATIONAL)).val("")}),e.on("input countrychange",function(){var t=h(this),e=intlTelInputGlobals.getInstance(this);t.css("color",t.val().trim()&&!e.isValidNumber()?"#ca4a1f":""),e.hiddenInput.value=e.getNumber()}).on("blur",function(){var t=intlTelInputGlobals.getInstance(this);t.setNumber(t.getNumber())})),1===h("#joinchat_form").length&&(h(".nav-tab").on("click",function(t){t.preventDefault();var e=h(this),n=e.attr("href"),i=h("input[name=_wp_http_referer]"),t=i.val();i.val(t.substr(0,t.indexOf("page=joinchat"))+"page=joinchat&tab="+n.substr(14)),h(".nav-tab").removeClass("nav-tab-active").attr("aria-selected","false"),e.addClass("nav-tab-active").attr("aria-selected","true").get(0).blur(),h(".joinchat-tab").removeClass("joinchat-tab-active"),h(n).addClass("joinchat-tab-active").find("textarea").each(r)}),h("#joinchat_mobile_only").on("change",function(){h("#joinchat_whatsapp_web, #joinchat_qr").closest("tr").toggleClass("joinchat-hidden",this.checked)}).trigger("change"),h("#joinchat_message_delay").on("change input",function(){h("#joinchat_message_badge, #joinchat_message_views").closest("tr").toggleClass("joinchat-hidden","0"==this.value)}).trigger("change"),h(".joinchat-show-help").on("click",function(t){t.preventDefault();t=h(this).attr("href");h("#contextual-help-wrap").is(":visible")?h("html, body").animate({scrollTop:0}):h("#contextual-help-link").trigger("click"),h("#"!=t?t:"#tab-link-styles-and-vars").find("a").trigger("click")}),h("textarea","#joinchat_form").on("focus",function(){h(this).closest("tr").addClass("joinchat--focus")}).on("blur",function(){h(this).closest("tr").removeClass("joinchat--focus")}).on("input",r).each(r),h("#joinchat_form").find(".autofill").on("change",function(){this.title=""==this.value?joinchat_admin.example:""}).on("dblclick",function(){""==this.value&&(this.value=this.placeholder,this.title="")}).trigger("change"),c=h("#joinchat_tab_visibility"),l=h(".joinchat_view_all").data("inheritance")||{all:["front_page","blog_page","404_page","search","archive","singular","cpts"],archive:["date","author"],singular:["page","post"]},h("input",c).on("change",function(){s()}),h(".joinchat_view_reset").on("click",function(t){t.preventDefault(),h('input[value=""]',c).prop("checked",!0),h(".joinchat_view_all input",c).first().prop("checked",!0),s()}),s(),h("#joinchat_button_image_add").on("click",function(t){t.preventDefault(),n||((n=wp.media({title:h(this).data("title")||"Select button image",button:{text:h(this).data("button")||"Use Image"},library:{type:"image"},multiple:!1})).on("select",function(){var t=n.state().get("selection").first().toJSON(),e=t.sizes&&t.sizes.thumbnail&&t.sizes.thumbnail.url||t.url;h("#joinchat_button_image_holder").css({"background-size":"cover","background-image":"url("+e+")"}),h("#joinchat_button_image").val(t.id),h("#joinchat_button_image_remove").removeClass("joinchat-hidden")}),n.on("open",function(){var t=wp.media.attachment(h("#joinchat_button_image").val());n.state().get("selection").add(t?[t]:[])})),n.open()}),h("#joinchat_button_image_remove").on("click",function(t){t.preventDefault(),h("#joinchat_button_image_holder").removeAttr("style"),h("#joinchat_button_image").val(""),h(this).addClass("joinchat-hidden")}),h("#joinchat_color").wpColorPicker(),h("#joinchat_header_custom").on("click",function(){h(this).prev().find("input").prop("checked",!0)}),h("#joinchat_woo_btn_position").on("change",function(){h("#joinchat_woo_btn_text").closest("tr").toggleClass("joinchat-hidden","none"==h(this).val())}).trigger("change")),h(".joinchat-metabox").length&&h(".joinchat-metabox textarea").on("focus input",r).each(r)})}(jQuery);
|
1 |
+
!function(h){"use strict";function r(){h(this).height(0).height(this.scrollHeight)}window.intl_tel_input_version=window.intlTelConf&&intlTelConf.version,h(function(){var n,t,i,e,a,o,c,l;function s(t,e){var n;t=t||"all",e=e||h('input[name="joinchat[view]['+t+']"]:checked').val(),h(".view_inheritance_"+t).toggleClass("dashicons-visibility","yes"==e).toggleClass("dashicons-hidden","no"==e),"cpts"==t?h("[class*=view_inheritance_cpt_]").toggleClass("dashicons-visibility","yes"==e).toggleClass("dashicons-hidden","no"==e):t in l&&(n=""===(n=h('input[name="joinchat[view]['+t+']"]:checked').val())?e:n,h.each(l[t],function(){s(this,n)}))}"function"==typeof intlTelInput&&h("#joinchat_phone").length&&(t=JSON.parse(localStorage.joinchat_country_code||"{}"),i=!(!t.code||t.date!=(new Date).toDateString())&&t.code,e=h("#joinchat_phone"),a=""===e.val()?e.attr("placeholder"):null,e.removeAttr("placeholder"),(o=intlTelInput(e.get(0),{hiddenInput:e.data("name")||"joinchat[telephone]",initialCountry:"auto",preferredCountries:[i||""],geoIpLookup:function(e){i?e(i):h.getJSON("https://ipinfo.io").always(function(t){t=t&&t.country?t.country:"";localStorage.joinchat_country_code=JSON.stringify({code:t,date:(new Date).toDateString()}),e(t)})},customPlaceholder:function(t){return intlTelConf.placeholder+" "+t},utilsScript:intlTelConf.utils_js})).hiddenInput.value=e.val(),"string"==typeof a&&""!=a&&o.promise.then(function(){o.setNumber(a),e.attr("placeholder",o.getNumber(intlTelInputUtils.numberFormat.NATIONAL)).val("")}),e.on("input countrychange",function(){var t=h(this),e=intlTelInputGlobals.getInstance(this);t.css("color",t.val().trim()&&!e.isValidNumber()?"#ca4a1f":""),e.hiddenInput.value=e.getNumber()}).on("blur",function(){var t=intlTelInputGlobals.getInstance(this);t.setNumber(t.getNumber())})),1===h("#joinchat_form").length&&(h(".nav-tab").on("click",function(t){t.preventDefault();var e=h(this),n=e.attr("href"),i=h("input[name=_wp_http_referer]"),t=i.val();i.val(t.substr(0,t.indexOf("page=joinchat"))+"page=joinchat&tab="+n.substr(14)),h(".nav-tab").removeClass("nav-tab-active").attr("aria-selected","false"),e.addClass("nav-tab-active").attr("aria-selected","true").get(0).blur(),h(".joinchat-tab").removeClass("joinchat-tab-active"),h(n).addClass("joinchat-tab-active").find("textarea").each(r)}),h("#joinchat_mobile_only").on("change",function(){h("#joinchat_whatsapp_web, #joinchat_qr").closest("tr").toggleClass("joinchat-hidden",this.checked)}).trigger("change"),h("#joinchat_message_delay").on("change input",function(){h("#joinchat_message_badge, #joinchat_message_views").closest("tr").toggleClass("joinchat-hidden","0"==this.value)}).trigger("change"),h(".joinchat-show-help").on("click",function(t){t.preventDefault();t=h(this).attr("href");h("#contextual-help-wrap").is(":visible")?h("html, body").animate({scrollTop:0}):h("#contextual-help-link").trigger("click"),h("#"!=t?t:"#tab-link-styles-and-vars").find("a").trigger("click")}),h("textarea","#joinchat_form").on("focus",function(){h(this).closest("tr").addClass("joinchat--focus")}).on("blur",function(){h(this).closest("tr").removeClass("joinchat--focus")}).on("input",r).each(r),h("#joinchat_form").find(".autofill").on("change",function(){this.title=""==this.value?joinchat_admin.example:""}).on("dblclick",function(){""==this.value&&(this.value=this.placeholder,this.title="")}).trigger("change"),c=h("#joinchat_tab_visibility"),l=h(".joinchat_view_all").data("inheritance")||{all:["front_page","blog_page","404_page","search","archive","singular","cpts"],archive:["date","author"],singular:["page","post"]},h("input",c).on("change",function(){s()}),h(".joinchat_view_reset").on("click",function(t){t.preventDefault(),h('input[value=""]',c).prop("checked",!0),h(".joinchat_view_all input",c).first().prop("checked",!0),s()}),s(),h("#joinchat_button_image_add").on("click",function(t){t.preventDefault(),n||((n=wp.media({title:h(this).data("title")||"Select button image",button:{text:h(this).data("button")||"Use Image"},library:{type:"image"},multiple:!1})).on("select",function(){var t=n.state().get("selection").first().toJSON(),e=t.sizes&&t.sizes.thumbnail&&t.sizes.thumbnail.url||t.url;h("#joinchat_button_image_holder").css({"background-size":"cover","background-image":"url("+e+")"}),h("#joinchat_button_image").val(t.id),h("#joinchat_button_image_remove").removeClass("joinchat-hidden")}),n.on("open",function(){var t=wp.media.attachment(h("#joinchat_button_image").val());n.state().get("selection").add(t?[t]:[])})),n.open()}),h("#joinchat_button_image_remove").on("click",function(t){t.preventDefault(),h("#joinchat_button_image_holder").removeAttr("style"),h("#joinchat_button_image").val(""),h(this).addClass("joinchat-hidden")}),h("#joinchat_color").wpColorPicker(),h("#joinchat_header_custom").on("click",function(){h(this).prev().find("input").prop("checked",!0)}),h("#joinchat_woo_btn_position").on("change",function(){h("#joinchat_woo_btn_text").closest("tr").toggleClass("joinchat-hidden","none"==h(this).val())}).trigger("change"),h("#joinchat_gads").on("focus",function(){""==h(this).val()&&h(this).val("AW-_________/____________________")}).on("input focus",function(){h(this).css("color",/^AW-\d{9}\/\w{19,22}$/.test(h(this).val().trim())?"":"#ca4a1f")}).on("blur",function(){"AW-_________/____________________"==h(this).val()&&h(this).val("")})),h(".joinchat-metabox").length&&h(".joinchat-metabox textarea").on("focus input",r).each(r)})}(jQuery);
|
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.4.
|
13 |
* Author: Creame
|
14 |
* Author URI: https://crea.me
|
15 |
* License: GPL-2.0+
|
@@ -26,7 +26,7 @@ if ( ! defined( 'WPINC' ) ) {
|
|
26 |
/**
|
27 |
* Define constants.
|
28 |
*/
|
29 |
-
define( 'JOINCHAT_VERSION', '4.4.
|
30 |
define( 'JOINCHAT_FILE', __FILE__ );
|
31 |
define( 'JOINCHAT_DIR', plugin_dir_path( JOINCHAT_FILE ) );
|
32 |
define( 'JOINCHAT_BASENAME', plugin_basename( JOINCHAT_FILE ) );
|
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.4.1
|
13 |
* Author: Creame
|
14 |
* Author URI: https://crea.me
|
15 |
* License: GPL-2.0+
|
26 |
/**
|
27 |
* Define constants.
|
28 |
*/
|
29 |
+
define( 'JOINCHAT_VERSION', '4.4.1' );
|
30 |
define( 'JOINCHAT_FILE', __FILE__ );
|
31 |
define( 'JOINCHAT_DIR', plugin_dir_path( JOINCHAT_FILE ) );
|
32 |
define( 'JOINCHAT_BASENAME', plugin_basename( JOINCHAT_FILE ) );
|