Connect License class to the real auroraplugins.com license server

- License.php now calls the aurora-licensing plugin's REST API
  (/wp-json/aurora-licensing/v1/validate|activate|deactivate) instead of
  treating any non-empty license_key as active. Result is cached in the
  aurora_admin_license_status option for 12 hours; is_active() and
  is_feature_available() read the cache instead of hitting the network on
  every admin page load.
- Hooks update_option_aurora_admin_settings to activate/deactivate
  immediately when the license_key setting actually changes, rather than
  waiting out the cache. Instantiated in AuroraAdmin.php so that hook
  registers.
- Settings page now surfaces the real status (active/invalid/unreachable,
  with the server's own message) as a status line under the License key
  field, instead of a field that silently does nothing.
- Verified live against the real server: a fake test key correctly came
  back locked with the server's own "License key not found." message.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
This commit is contained in:
nixpanel
2026-07-03 20:26:00 -05:00
co-authored by Claude Sonnet 5
parent eb03d3dd6c
commit 540083e6e4
6 changed files with 264 additions and 30 deletions
+2
View File
@@ -2,6 +2,7 @@
namespace AuroraAdmin\App;
use AuroraAdmin\Options\Settings;
use AuroraAdmin\Licensing\License;
use AuroraAdmin\Shell\Shell;
use AuroraAdmin\Pages\DashboardTakeover;
use AuroraAdmin\Pages\SettingsPage;
@@ -35,6 +36,7 @@ class AuroraAdmin
public function __construct()
{
new Settings();
new License();
new Shell();
new DashboardTakeover();
new SettingsPage();