Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Wordpress plugin for tawk.to",
"type": "project",
"license": "GPL-3.0",
"version": "0.9.4",
"version": "0.9.5",
"require": {
"tawk/url-utils": "2.0.1"
},
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tawk-wordpress",
"version": "0.9.4",
"version": "0.9.5",
"description": "tawk.to wordpress plugin",
"main": "index.js",
"directories": {
Expand Down
8 changes: 7 additions & 1 deletion tawkto/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tags: tawk.to,tawk,free live chat,ai chat,chat widget
Requires at least: 2.7
Requires PHP: 5.6
Tested up to: 7.1
Stable tag: 0.9.4
Stable tag: 0.9.5
License: GPLv3
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Expand Down Expand Up @@ -71,6 +71,12 @@ Note: You will need a free tawk.to account: [Create one for free here!](https://

== Changelog ==

= 0.9.5 =
* Fix Javascript API key being reset after plugin update

= 0.9.4 =
* Supported version bump to 7.1

= 0.9.3 =
* Supported version bump to 6.9

Expand Down
2 changes: 1 addition & 1 deletion tawkto/tawkto.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Plugin Name: Tawk.to Live Chat
* Plugin URI: https://www.tawk.to
* Description: Embeds Tawk.to live chat widget to your site
* Version: 0.9.4
* Version: 0.9.5
* Author: Tawkto
* Text Domain: tawk-to-live-chat
* License: GPLv3
Expand Down
4 changes: 2 additions & 2 deletions tawkto/templates/widget.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

?>

<!--Start of Tawk.to Script (0.9.4)-->
<!--Start of Tawk.to Script (0.9.5)-->
<script id="tawk-script" type="text/javascript">
var Tawk_API = Tawk_API || {};
<?php if ( isset( $customer_details ) && $enable_visitor_recognition ) : ?>
Expand All @@ -24,5 +24,5 @@
s0.parentNode.insertBefore( s1, s0 );
})();
</script>
<!--End of Tawk.to Script (0.9.4)-->
<!--End of Tawk.to Script (0.9.5)-->

20 changes: 8 additions & 12 deletions tawkto/upgrade.manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,21 +58,17 @@ public function start() {
return;
}

// special case: we've never set the version before.
// All plugins prior to the current version needs the upgrade.
if ( version_compare( $this->prev_ver, $this->curr_ver ) < 0 ) {
// are there upgrade steps depending on how out-of-date?
foreach ( $this->upgrades as $upgrade_ver => $upgrade ) {
// only run upgrades if upgrade version is lower than
// and equal to the current version.
if ( version_compare( $upgrade_ver, $this->curr_ver ) <= 0 ) {
$this->do_upgrade( $upgrade_ver );
}

update_option( $this->version_var_name, $upgrade_ver );
// only run upgrades newer than the previously installed version and
// up to the current version. If the version was never recorded,
// prev_ver is empty and every upgrade runs.
foreach ( $this->upgrades as $upgrade_ver => $upgrade ) {
if ( version_compare( $upgrade_ver, $this->prev_ver ) > 0 &&
version_compare( $upgrade_ver, $this->curr_ver ) <= 0 ) {
$this->do_upgrade( $upgrade_ver );
}
}

update_option( $this->version_var_name, $this->curr_ver );
Comment thread
greptile-apps[bot] marked this conversation as resolved.
Resolved
}

/**
Expand Down
4 changes: 3 additions & 1 deletion tawkto/upgrades/version.090.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ public static function upgrade() {
update_option( TawkTo_Settings::TAWK_VISIBILITY_OPTIONS, $visibility );
}

update_option( TawkTo_Settings::TAWK_SECURITY_OPTIONS, array( 'js_api_key' => '' ) );
if ( ! get_option( TawkTo_Settings::TAWK_SECURITY_OPTIONS, false ) ) {
update_option( TawkTo_Settings::TAWK_SECURITY_OPTIONS, array( 'js_api_key' => '' ) );
}
}
}