From c162f02408f77c1acafeb3165b6965a388063928 Mon Sep 17 00:00:00 2001 From: Leo Fajardo Date: Tue, 14 Oct 2025 19:05:04 +0800 Subject: [PATCH] [action] [license-activation] Add a new action that is triggered after a license activation. --- includes/class-freemius.php | 6 ++++++ start.php | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/class-freemius.php b/includes/class-freemius.php index 8013813c..79439c8e 100755 --- a/includes/class-freemius.php +++ b/includes/class-freemius.php @@ -14034,6 +14034,10 @@ private function activate_license( $result['next_page'] = $next_page; } + if ( $result['success'] ) { + $this->do_action( 'after_license_activation' ); + } + return $result; } @@ -21667,6 +21671,8 @@ protected function _activate_license( $background = false, $premium_license = nu return; } + $this->do_action( 'after_license_activation' ); + $premium_license = new FS_Plugin_License( $license ); // Updated site plan. diff --git a/start.php b/start.php index 0e31f206..2daccd6f 100644 --- a/start.php +++ b/start.php @@ -15,7 +15,7 @@ * * @var string */ - $this_sdk_version = '2.12.2.1'; + $this_sdk_version = '2.12.2.2'; #region SDK Selection Logic -------------------------------------------------------------------- @@ -453,6 +453,7 @@ function_exists( 'wp_is_json_request' ) && * * fs_after_license_loaded_{plugin_slug} * fs_after_license_change_{plugin_slug} + * fs_after_license_activation_{plugin_slug} * fs_after_license_deactivation_{plugin_slug} * fs_after_plans_sync_{plugin_slug} *