From 6bb28c4c1fb7faf61d4ea232cb349a2aea9dff08 Mon Sep 17 00:00:00 2001 From: Swashata Ghosh Date: Wed, 24 Dec 2025 14:26:56 +0530 Subject: [PATCH] [addon] [dev] Have a better DX when activating an add-on without releasing it --- start.php | 2 +- templates/account.php | 22 +++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/start.php b/start.php index 73688982..f1534010 100644 --- a/start.php +++ b/start.php @@ -15,7 +15,7 @@ * * @var string */ - $this_sdk_version = '2.13.0'; + $this_sdk_version = '2.13.0.1'; #region SDK Selection Logic -------------------------------------------------------------------- diff --git a/templates/account.php b/templates/account.php index 89120022..777c22c6 100755 --- a/templates/account.php +++ b/templates/account.php @@ -252,6 +252,8 @@ $available_license_paid_plan = is_object( $available_license ) ? $fs->_get_plan_by_id( $available_license->plan_id ) : null; + + $is_dev_mode = ( defined( 'WP_FS__DEV_MODE' ) && WP_FS__DEV_MODE ); ?>
apply_filters( 'hide_account_tabs', false ) ) : ?> @@ -787,7 +789,7 @@ class="fs-tag fs-can_use_premium_code() ? 'success' : 'warn' ?>" - + @@ -853,10 +855,20 @@ class="fs-tag fs-can_use_premium_code() ? 'success' : 'warn' ?>" 'is_whitelabeled' => ( $is_whitelabeled && ! $is_data_debug_mode ) ); - fs_require_template( - 'account/partials/addon.php', - $addon_view_params - ); + if ( ! empty($addon_view_params['addon_info'] ) ) { + fs_require_template( + 'account/partials/addon.php', + $addon_view_params + ); + } else { + // If we are here it means there is an activation of an unreleased add-on and yet the SDK is not in development mode. + echo ''; + echo '' . esc_html( $addon_id ) . ''; + echo ''; + echo 'The add-on you have activated is no longer listed by the product owner, or the SDK is not running in test mode. Please contact support if you need further assistance.'; + echo ''; + echo ''; + } $odd = ! $odd; } ?>