|
31 | 31 | $downgrading_plan_text = fs_text_inline( 'Downgrading your plan', 'downgrading-plan', $slug ); |
32 | 32 | $cancelling_subscription_text = fs_text_inline( 'Cancelling the subscription', 'cancelling-subscription', $slug ); |
33 | 33 | /* 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 ); |
35 | 35 | $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 ); |
36 | 36 | $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 ); |
37 | 37 | $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 | 240 | true |
241 | 241 | ); |
242 | 242 |
|
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 | | - |
251 | 243 | $after_downgrade_message = ! $license->is_block_features ? |
252 | 244 | sprintf( $after_downgrade_non_blocking_text, $plan->title, $fs_addon->get_module_label( true ) ) : |
253 | 245 | sprintf( $after_downgrade_blocking_text, $plan->title ); |
254 | 246 |
|
255 | 247 | 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 | + |
256 | 256 | $buttons[] = fs_ui_get_action_button( |
257 | 257 | $fs->get_id(), |
258 | 258 | 'account', |
|
0 commit comments