Version Description
= * FIX WP Super Cache clear cache error on save
Download this release
Release Info
Developer | creapuntome |
Plugin | WhatsApp me |
Version | 4.0.7 |
Comparing to | |
See all releases |
Code changes from version 4.0.6 to 4.0.7
- README.txt +5 -2
- admin/class-joinchat-admin.php +1 -1
- includes/class-joinchat-util.php +19 -8
- joinchat.php +2 -2
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.4
|
7 |
Requires PHP: 5.3
|
8 |
-
Stable tag: 4.0.
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
@@ -181,6 +181,9 @@ Join.chat general text settings can be translated with the strings translation o
|
|
181 |
|
182 |
== Changelog ==
|
183 |
|
|
|
|
|
|
|
184 |
= 4.0.6 =
|
185 |
* Minor changes: better encode emoji detection, check WooCommerce version, css fixes and improvements
|
186 |
|
@@ -217,7 +220,7 @@ See [changelog.txt](https://plugins.svn.wordpress.org/creame-whatsapp-me/trunk/c
|
|
217 |
|
218 |
== Upgrade Notice ==
|
219 |
|
220 |
-
= 4.0.
|
221 |
**Join.chat rebrand!!** Analytics events change from `WhatsAppMe` to `JoinChat` and classes, actions and filters change from `wame` or `whatsappme` to `joinchat`.
|
222 |
|
223 |
= 2.3.0 =
|
5 |
Requires at least: 3.0.1
|
6 |
Tested up to: 5.4
|
7 |
Requires PHP: 5.3
|
8 |
+
Stable tag: 4.0.7
|
9 |
License: GPLv2 or later
|
10 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
11 |
|
181 |
|
182 |
== Changelog ==
|
183 |
|
184 |
+
= 4.0.7 =
|
185 |
+
* FIX WP Super Cache clear cache error on save
|
186 |
+
|
187 |
= 4.0.6 =
|
188 |
* Minor changes: better encode emoji detection, check WooCommerce version, css fixes and improvements
|
189 |
|
220 |
|
221 |
== Upgrade Notice ==
|
222 |
|
223 |
+
= 4.0.0 =
|
224 |
**Join.chat rebrand!!** Analytics events change from `WhatsAppMe` to `JoinChat` and classes, actions and filters change from `wame` or `whatsappme` to `joinchat`.
|
225 |
|
226 |
= 2.3.0 =
|
admin/class-joinchat-admin.php
CHANGED
@@ -1038,7 +1038,7 @@ class JoinChatAdmin {
|
|
1038 |
array( 'wpfc_clear_all_cache', true ), // WP Fastest Cache https://es.wordpress.org/plugins/wp-fastest-cache/
|
1039 |
'rocket_clean_minify', // WP Rocket https://wp-rocket.me
|
1040 |
'rocket_clean_domain',
|
1041 |
-
'wp_cache_clean_cache',
|
1042 |
'w3tc_flush_all', // W3 Total Cache https://wordpress.org/plugins/w3-total-cache/
|
1043 |
)
|
1044 |
);
|
1038 |
array( 'wpfc_clear_all_cache', true ), // WP Fastest Cache https://es.wordpress.org/plugins/wp-fastest-cache/
|
1039 |
'rocket_clean_minify', // WP Rocket https://wp-rocket.me
|
1040 |
'rocket_clean_domain',
|
1041 |
+
array( 'wp_cache_clean_cache', 'wp-cache-' ), // WP Super Cache https://wordpress.org/plugins/wp-super-cache/
|
1042 |
'w3tc_flush_all', // W3 Total Cache https://wordpress.org/plugins/w3-total-cache/
|
1043 |
)
|
1044 |
);
|
includes/class-joinchat-util.php
CHANGED
@@ -87,22 +87,33 @@ class JoinChatUtil {
|
|
87 |
$img_path = intval( $img ) > 0 ? get_attached_file( $img ) : $img;
|
88 |
|
89 |
if ( ! $img_path || ! file_exists( $img_path ) ) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
90 |
return false;
|
91 |
}
|
92 |
|
93 |
-
$uploads
|
94 |
-
$img_info
|
95 |
-
$
|
96 |
|
97 |
-
if ( ! file_exists( $
|
98 |
$new_img = wp_get_image_editor( $img_path );
|
99 |
|
100 |
if ( ! is_wp_error( $new_img ) ) {
|
101 |
$new_img->resize( $width, $height, $crop );
|
102 |
-
$new_img = $new_img->save( $
|
103 |
|
104 |
$thumb = array(
|
105 |
-
'url' => str_replace( $uploads['basedir'], $uploads['baseurl'], $
|
106 |
'width' => $new_img['width'],
|
107 |
'height' => $new_img['height'],
|
108 |
);
|
@@ -117,10 +128,10 @@ class JoinChatUtil {
|
|
117 |
);
|
118 |
}
|
119 |
} else {
|
120 |
-
@list($w, $h) = getimagesize( $
|
121 |
|
122 |
$thumb = array(
|
123 |
-
'url' => str_replace( $uploads['basedir'], $uploads['baseurl'], $
|
124 |
'width' => $w,
|
125 |
'height' => $h,
|
126 |
);
|
87 |
$img_path = intval( $img ) > 0 ? get_attached_file( $img ) : $img;
|
88 |
|
89 |
if ( ! $img_path || ! file_exists( $img_path ) ) {
|
90 |
+
// Try fallback if file_exists() fails
|
91 |
+
$src = wp_get_attachment_image_src( $img, array( $width, $height ) );
|
92 |
+
|
93 |
+
if ( is_array( $src ) ) {
|
94 |
+
return array(
|
95 |
+
'url' => $src[0],
|
96 |
+
'width' => $src[1],
|
97 |
+
'height' => $src[2],
|
98 |
+
);
|
99 |
+
}
|
100 |
+
|
101 |
return false;
|
102 |
}
|
103 |
|
104 |
+
$uploads = wp_get_upload_dir();
|
105 |
+
$img_info = pathinfo( $img_path );
|
106 |
+
$new_path = "{$img_info['dirname']}/{$img_info['filename']}-{$width}x{$height}.{$img_info['extension']}";
|
107 |
|
108 |
+
if ( ! file_exists( $new_path ) ) {
|
109 |
$new_img = wp_get_image_editor( $img_path );
|
110 |
|
111 |
if ( ! is_wp_error( $new_img ) ) {
|
112 |
$new_img->resize( $width, $height, $crop );
|
113 |
+
$new_img = $new_img->save( $new_path );
|
114 |
|
115 |
$thumb = array(
|
116 |
+
'url' => str_replace( $uploads['basedir'], $uploads['baseurl'], $new_path ),
|
117 |
'width' => $new_img['width'],
|
118 |
'height' => $new_img['height'],
|
119 |
);
|
128 |
);
|
129 |
}
|
130 |
} else {
|
131 |
+
@list($w, $h) = getimagesize( $new_path );
|
132 |
|
133 |
$thumb = array(
|
134 |
+
'url' => str_replace( $uploads['basedir'], $uploads['baseurl'], $new_path ),
|
135 |
'width' => $w,
|
136 |
'height' => $h,
|
137 |
);
|
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.0.
|
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( 'JOINCHAT_VERSION', '4.0.
|
31 |
|
32 |
/**
|
33 |
* 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.0.7
|
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( 'JOINCHAT_VERSION', '4.0.7' );
|
31 |
|
32 |
/**
|
33 |
* The core plugin class that is used to define internationalization,
|