Skip to content

Commit

Permalink
v1.4.14 take two
Browse files Browse the repository at this point in the history
  • Loading branch information
kilbot committed Mar 20, 2024
1 parent ab1c231 commit 2884716
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/sync-wporg-assets.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
name: Sync assets with wordpress.org

on:
push:
paths:
- 'readme.txt'
- '.wordpress-org/**'
workflow_dispatch:

jobs:
run:
Expand Down
12 changes: 12 additions & 0 deletions includes/Admin/Updaters/Pro_Plugin_Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,12 @@ public function plugin_information() {
*/
private function maybe_add_upgrade_notice() {
$license_status = $this->check_license_status();

// Check if $update_data is an object and convert to an array if so.
if ( is_object( $license_status ) ) {
$license_status = get_object_vars( $license_status );
}

$active = isset( $license_status['activated'] ) && $license_status['activated'];
$inactive = isset( $license_status['activated'] ) && ! $license_status['activated'];
$expired = isset( $license_status['expired'] ) && $license_status['expired'];
Expand Down Expand Up @@ -575,6 +581,12 @@ private function maybe_add_upgrade_notice() {
*/
public function license_status_notice() {
$license_status = $this->check_license_status();

// Check if $update_data is an object and convert to an array if so.
if ( is_object( $license_status ) ) {
$license_status = get_object_vars( $license_status );
}

$active = isset( $license_status['activated'] ) && $license_status['activated'];
$inactive = isset( $license_status['activated'] ) && ! $license_status['activated'];
$expired = isset( $license_status['expired'] ) && $license_status['expired'];
Expand Down

0 comments on commit 2884716

Please sign in to comment.