Skip to content

Commit

Permalink
Merge branch 'release/9.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
BracketSpaceWorker committed Nov 8, 2024
2 parents 6adfccc + 3a61faf commit be5d158
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion notification.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Description: Customisable email and webhook notifications with powerful developer friendly API for custom triggers and notifications. Send alerts easily.
* Author: BracketSpace
* Author URI: https://bracketspace.com
* Version: 9.0.2
* Version: 9.0.3
* Requires PHP: 7.4
* Requires at least: 5.8
* License: GPL3
Expand Down
5 changes: 4 additions & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Contributors: notification, bracketspace, Kubitomakita, tomaszadamowicz, insejn,
Tags: notification, notify, alert, email, mail, webhook, API, developer, framework
Requires at least: 4.9
Tested up to: 6.6
Stable tag: 9.0.2
Stable tag: 9.0.3
Requires PHP: 7.4
License: GPLv3
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Expand Down Expand Up @@ -297,6 +297,9 @@ Yes! We're offering a [custom plugin development](https://bracketspace.com/custo

== Changelog ==

= 9.0.3 =
* [Fixed] No license activated in v8 being displayed in the admin.

= 9.0.2 =
* [Fixed] WP CLI add command function is not giving warnings anymore.
* [Fixed] Comment author email and display name merge tags.
Expand Down
13 changes: 9 additions & 4 deletions src/Core/License.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,16 +65,21 @@ public function getLicenses()
*/
public function get()
{
$driver = new CacheDriver\ObjectCache('notification_license');
$driver = new CacheDriver\ObjectCache('notification_license/v2');
$cache = new Cache($driver, $this->extension['slug']);

return $cache->collect(
function () {
$licenses = $this->getLicenses();
$license = false;
$license = new \stdClass();

if (! isset($licenses[$this->extension['slug']])) {
return false;
}

if (isset($licenses[$this->extension['slug']])) {
$license = $licenses[$this->extension['slug']];
foreach ((array)$licenses[$this->extension['slug']] as $key => $value) {
$keyMapped = lcfirst(str_replace('_', '', ucwords((string)$key, '_')));
$license->$keyMapped = $value;
}

return $license;
Expand Down

0 comments on commit be5d158

Please sign in to comment.