File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -21347,7 +21347,9 @@ private function _sync_plugin_license(
2134721347 /**
2134821348 * Sync licenses. Pass the site's license ID so that the foreign licenses will be fetched if the license
2134921349 * associated with that ID is not included in the user's licenses collection.
21350+ * Save previous value to manage remote license renewals.
2135021351 */
21352+ $was_license_expired_before_sync = $this->_license->is_expired();
2135121353 $this->_sync_licenses(
2135221354 $site->license_id,
2135321355 ( $is_context_single_site ?
@@ -21481,6 +21483,14 @@ private function _sync_plugin_license(
2148121483 $plan_change = 'expired';
2148221484 }
2148321485 }
21486+ } else if ( $was_license_expired_before_sync ) {
21487+ /**
21488+ * If license was expired but it is not anymore.
21489+ *
21490+ *
21491+ * @author Daniele Alessandra (@danielealessandra)
21492+ */
21493+ $plan_change = 'extended';
2148421494 }
2148521495 }
2148621496
@@ -21558,6 +21568,12 @@ private function _sync_plugin_license(
2155821568 'license_expired',
2155921569 ) );
2156021570 break;
21571+ case 'extended':
21572+ $this->_admin_notices->remove_sticky( array(
21573+ 'trial_expired',
21574+ 'license_expired',
21575+ ) );
21576+ break;
2156121577 case 'changed':
2156221578 $this->_admin_notices->add_sticky(
2156321579 sprintf(
You can’t perform that action at this time.
0 commit comments