Skip to content

Commit 3f436e5

Browse files
fajardoleoswashata
authored andcommitted
[account] [addon] [license] [php-8.1] Fixed an issue with the expiration label of lifetime add-on licenses.
1 parent 0f6b0f1 commit 3f436e5

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

start.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* @var string
1717
*/
18-
$this_sdk_version = '2.6.2.3';
18+
$this_sdk_version = '2.6.2.4';
1919

2020
#region SDK Selection Logic --------------------------------------------------------------------
2121

templates/account/partials/addon.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
$downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug );
3232
$cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug );
3333
/* translators: %1$s: Either 'Downgrading your plan' or 'Cancelling the subscription' */
34-
$downgrade_x_confirm_text = fs_text_inline( '%1$s will immediately stop all future recurring payments and your %s plan license will expire in %s.', 'downgrade-x-confirm', $slug );
34+
$downgrade_x_confirm_text = fs_text_inline( '%1$s will immediately stop all future recurring payments and your %2$s plan license will expire in %3$s.', 'downgrade-x-confirm', $slug );
3535
$prices_increase_text = fs_text_inline( 'Please note that we will not be able to grandfather outdated pricing for renewals/new subscriptions after a cancellation. If you choose to renew the subscription manually in the future, after a price increase, which typically occurs once a year, you will be charged the updated price.', 'pricing-increase-warning', $slug );
3636
$cancel_trial_confirm_text = fs_text_inline( 'Cancelling the trial will immediately block access to all premium features. Are you sure?', 'cancel-trial-confirm', $slug );
3737
$after_downgrade_non_blocking_text = fs_text_inline( 'You can still enjoy all %s features but you will not have access to %s security & feature updates, nor support.', 'after-downgrade-non-blocking', $slug );
@@ -240,19 +240,19 @@
240240
true
241241
);
242242

243-
$human_readable_license_expiration = human_time_diff( time(), strtotime( $license->expiration ) );
244-
$downgrade_confirmation_message = sprintf(
245-
$downgrade_x_confirm_text,
246-
( $fs_addon->is_only_premium() ? $cancelling_subscription_text : $downgrading_plan_text ),
247-
$plan->title,
248-
$human_readable_license_expiration
249-
);
250-
251243
$after_downgrade_message = ! $license->is_block_features ?
252244
sprintf( $after_downgrade_non_blocking_text, $plan->title, $fs_addon->get_module_label( true ) ) :
253245
sprintf( $after_downgrade_blocking_text, $plan->title );
254246

255247
if ( ! $license->is_lifetime() && $is_active_subscription ) {
248+
$human_readable_license_expiration = human_time_diff( time(), strtotime( $license->expiration ) );
249+
$downgrade_confirmation_message = sprintf(
250+
$downgrade_x_confirm_text,
251+
( $fs_addon->is_only_premium() ? $cancelling_subscription_text : $downgrading_plan_text ),
252+
$plan->title,
253+
$human_readable_license_expiration
254+
);
255+
256256
$buttons[] = fs_ui_get_action_button(
257257
$fs->get_id(),
258258
'account',

0 commit comments

Comments
 (0)