Version Description
- Fix. WhatsApp contact phone number sanitize
Download this release
Release Info
Developer | quadlayers |
Plugin | WhatsApp Chat WP |
Version | 6.0.1 |
Comparing to | |
See all releases |
Code changes from version 6.0.0 to 6.0.1
- includes/models/Contact.php +7 -4
- readme.txt +6 -3
- wp-whatsapp-chat.php +2 -2
includes/models/Contact.php
CHANGED
@@ -87,8 +87,8 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
87 |
return false;
|
88 |
}
|
89 |
|
|
|
90 |
function settings_sanitize( $settings ) {
|
91 |
-
|
92 |
if ( isset( $settings['contacts'] ) ) {
|
93 |
if ( count( $settings['contacts'] ) ) {
|
94 |
foreach ( $settings['contacts'] as $id => $c ) {
|
@@ -103,13 +103,13 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
103 |
$settings['contacts'][ $id ]['message'] = wp_kses_post( $settings['contacts'][ $id ]['message'] );
|
104 |
$settings['contacts'][ $id ]['timeto'] = wp_kses_post( $settings['contacts'][ $id ]['timeto'] );
|
105 |
$settings['contacts'][ $id ]['phone'] = qlwapp_format_phone( $settings['contacts'][ $id ]['phone'] );
|
106 |
-
$settings['contacts'][ $id ]['timefrom'] =
|
107 |
$settings['contacts'][ $id ]['timedays'] = $settings['contacts'][ $id ]['timedays'];
|
108 |
}
|
109 |
}
|
110 |
}
|
111 |
return $settings;
|
112 |
-
}
|
113 |
|
114 |
function sanitize_value_data( $contacts, $args = null ) {
|
115 |
foreach ( $contacts as $key => $contact ) {
|
@@ -123,6 +123,7 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
123 |
$contacts = $this->get_contacts();
|
124 |
return array_replace_recursive( $this->get_args(), $contacts[ $id ] );
|
125 |
}
|
|
|
126 |
function get_contacts() {
|
127 |
|
128 |
$button_model = new QLWAPP_Button();
|
@@ -139,11 +140,13 @@ class QLWAPP_Contact extends QLWAPP_Model {
|
|
139 |
}
|
140 |
}
|
141 |
|
142 |
-
// Include the button phone number if the contact number is empty
|
143 |
foreach ( $result as $id => $contact ) {
|
|
|
144 |
if ( ! $contact['phone'] ) {
|
145 |
$result[ $id ]['phone'] = $button['phone'];
|
146 |
}
|
|
|
|
|
147 |
// Apply vars replacement
|
148 |
if ( ! is_admin() ) {
|
149 |
$result[ $id ]['message'] = qlwapp_vars_replacements( $contact['message'] );
|
87 |
return false;
|
88 |
}
|
89 |
|
90 |
+
/*
|
91 |
function settings_sanitize( $settings ) {
|
|
|
92 |
if ( isset( $settings['contacts'] ) ) {
|
93 |
if ( count( $settings['contacts'] ) ) {
|
94 |
foreach ( $settings['contacts'] as $id => $c ) {
|
103 |
$settings['contacts'][ $id ]['message'] = wp_kses_post( $settings['contacts'][ $id ]['message'] );
|
104 |
$settings['contacts'][ $id ]['timeto'] = wp_kses_post( $settings['contacts'][ $id ]['timeto'] );
|
105 |
$settings['contacts'][ $id ]['phone'] = qlwapp_format_phone( $settings['contacts'][ $id ]['phone'] );
|
106 |
+
$settings['contacts'][ $id ]['timefrom'] = $settings['contacts'][ $id ]['timefrom'];
|
107 |
$settings['contacts'][ $id ]['timedays'] = $settings['contacts'][ $id ]['timedays'];
|
108 |
}
|
109 |
}
|
110 |
}
|
111 |
return $settings;
|
112 |
+
} */
|
113 |
|
114 |
function sanitize_value_data( $contacts, $args = null ) {
|
115 |
foreach ( $contacts as $key => $contact ) {
|
123 |
$contacts = $this->get_contacts();
|
124 |
return array_replace_recursive( $this->get_args(), $contacts[ $id ] );
|
125 |
}
|
126 |
+
|
127 |
function get_contacts() {
|
128 |
|
129 |
$button_model = new QLWAPP_Button();
|
140 |
}
|
141 |
}
|
142 |
|
|
|
143 |
foreach ( $result as $id => $contact ) {
|
144 |
+
// Include the button phone number if the contact number is empty
|
145 |
if ( ! $contact['phone'] ) {
|
146 |
$result[ $id ]['phone'] = $button['phone'];
|
147 |
}
|
148 |
+
// Sanitize the contact phone number
|
149 |
+
$result[ $id ]['phone'] = qlwapp_format_phone( $result[ $id ]['phone'] );
|
150 |
// Apply vars replacement
|
151 |
if ( ! is_admin() ) {
|
152 |
$result[ $id ]['message'] = qlwapp_vars_replacements( $contact['message'] );
|
readme.txt
CHANGED
@@ -6,7 +6,7 @@ Tags: whatsapp, whatsapp business, click to chat, whatsapp chat, whatsapp suppor
|
|
6 |
Requires at least: 4.6
|
7 |
Requires PHP: 5.6
|
8 |
Tested up to: 6.0.1
|
9 |
-
Stable tag: 6.0.
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
@@ -56,7 +56,7 @@ Synce version 5.0.6 you're able use variables in your WhatsApp Button or contact
|
|
56 |
|
57 |
== 🎁 New!! WooCommerce ==
|
58 |
|
59 |
-
Since version 6.0.
|
60 |
|
61 |
The WhatsApp Contact Button can be included directly on your WooCoomerce product pages next to the “Add to cart” button.
|
62 |
|
@@ -132,8 +132,11 @@ Don't use: +001-(555)1234567
|
|
132 |
|
133 |
== Changelog ==
|
134 |
|
|
|
|
|
|
|
135 |
= 6.0.0 =
|
136 |
-
*
|
137 |
|
138 |
= 5.1.0 =
|
139 |
* Fix. WhatsApp init hook
|
6 |
Requires at least: 4.6
|
7 |
Requires PHP: 5.6
|
8 |
Tested up to: 6.0.1
|
9 |
+
Stable tag: 6.0.1
|
10 |
License: GPLv3
|
11 |
License URI: https://www.gnu.org/licenses/gpl-3.0.html
|
12 |
|
56 |
|
57 |
== 🎁 New!! WooCommerce ==
|
58 |
|
59 |
+
Since version 6.0.1 you can include a call to action button in the WooCommerce Single product pages that allows your users to prompt a custom message to your WhatsApp App.
|
60 |
|
61 |
The WhatsApp Contact Button can be included directly on your WooCoomerce product pages next to the “Add to cart” button.
|
62 |
|
132 |
|
133 |
== Changelog ==
|
134 |
|
135 |
+
= 6.0.1 =
|
136 |
+
* Fix. WhatsApp contact phone number sanitize
|
137 |
+
|
138 |
= 6.0.0 =
|
139 |
+
* New. WhatsApp WooCommerce Support
|
140 |
|
141 |
= 5.1.0 =
|
142 |
* Fix. WhatsApp init hook
|
wp-whatsapp-chat.php
CHANGED
@@ -4,7 +4,7 @@
|
|
4 |
* Plugin Name: Social Chat
|
5 |
* Description: Social Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
|
6 |
* Plugin URI: https://quadlayers.com/portfolio/whatsapp-chat/
|
7 |
-
* Version: 6.0.
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
@@ -18,7 +18,7 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
18 |
}
|
19 |
|
20 |
define( 'QLWAPP_PLUGIN_NAME', 'Social Chat' );
|
21 |
-
define( 'QLWAPP_PLUGIN_VERSION', '6.0.
|
22 |
define( 'QLWAPP_PLUGIN_FILE', __FILE__ );
|
23 |
define( 'QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
24 |
define( 'QLWAPP_PREFIX', 'qlwapp' );
|
4 |
* Plugin Name: Social Chat
|
5 |
* Description: Social Chat allows your visitors to contact you or your team through WhatsApp chat with a single click.
|
6 |
* Plugin URI: https://quadlayers.com/portfolio/whatsapp-chat/
|
7 |
+
* Version: 6.0.1
|
8 |
* Author: QuadLayers
|
9 |
* Author URI: https://quadlayers.com
|
10 |
* License: GPLv3
|
18 |
}
|
19 |
|
20 |
define( 'QLWAPP_PLUGIN_NAME', 'Social Chat' );
|
21 |
+
define( 'QLWAPP_PLUGIN_VERSION', '6.0.1' );
|
22 |
define( 'QLWAPP_PLUGIN_FILE', __FILE__ );
|
23 |
define( 'QLWAPP_PLUGIN_DIR', __DIR__ . DIRECTORY_SEPARATOR );
|
24 |
define( 'QLWAPP_PREFIX', 'qlwapp' );
|