Skip to content

Commit ae297e3

Browse files
chore: review
1 parent 7ed2e10 commit ae297e3

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

inc/admin.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ public function __construct() {
113113
}
114114

115115
add_filter( 'themeisle-sdk/survey/' . OPTML_PRODUCT_SLUG, [ $this, 'get_survey_metadata' ], 10, 2 );
116-
add_action( 'admin_init', [ $this, 'mark_free_user_with_offload' ] );
116+
add_action( 'admin_init', [ $this, 'mark_user_with_offload' ] );
117117
}
118118

119119
/**
@@ -1392,7 +1392,7 @@ private function localize_dashboard_app() {
13921392
'bf_notices' => $this->get_bf_notices(),
13931393
'spc_banner' => $this->get_spc_banner(),
13941394
'show_exceed_plan_quota_notice' => $this->should_show_exceed_quota_warning(),
1395-
'show_free_user_with_offload_notice' => get_option( 'optml_free_user_with_offload', 'no' ),
1395+
'show_free_user_with_offload_notice' => get_option( 'optml_has_offloading_enabled_on_upgrade', 'no' ),
13961396
];
13971397
}
13981398

@@ -1621,7 +1621,7 @@ private function get_dashboard_strings() {
16211621
' <a href="' . esc_url( tsdk_translate_link( 'https://dashboard.optimole.com/register', 'query' ) ) . '" target="_blank">optimole.com</a>'
16221622
),
16231623
'account_needed_subtitle_1' => sprintf(
1624-
/* translators: 1 is starting bold tag, 2 is ending bold tag, 3 is the starting bold tag, 4 is the limit number, 5 is ending bold tag, 6 is the starting anchor tag for the docs link on how we count visits, 7 is the ending anchor tag. */
1624+
/* translators: 1 is the starting bold tag, 2 is the ending bold tag, 3 is the starting bold tag, 4 is the limit number, 5 is ending bold tag, 6 is the starting anchor tag for the docs link on how we count visits, 7 is the ending anchor tag. */
16251625
__( '%1$sOptimize unlimited images%2$s for up to %3$s monthly %4$svisitors%5$s - completely FREE.', 'optimole-wp' ),
16261626
'<strong>',
16271627
'</strong>',
@@ -2077,7 +2077,7 @@ private function get_dashboard_strings() {
20772077
'exceed_plan_quota_notice_start_action' => __( 'Yes, Transfer to Optimole Cloud', 'optimole-wp' ),
20782078
'exceed_plan_quota_notice_secondary_action' => __( 'No, keep images on my website', 'optimole-wp' ),
20792079
'plan_update_notice_title' => __( 'Plan Update', 'optimole-wp' ),
2080-
'plan_update_notice_desc' => __( 'We\'ve changed how plans work. Users on Optimole Free plan can not offload new image. Existing images that are already offloaded will remain offloaded.', 'optimole-wp' ),
2080+
'plan_update_notice_desc' => __( 'We\'ve changed how plans work. Users on the Optimole Free plan cannot offload new images. Existing images that are already offloaded will remain offloaded.', 'optimole-wp' ),
20812081
'upgrade_to_use_offloading_notice_desc' => __( 'Offloading images is a PRO feature. Please upgrade your plan to enable image transfer to Optimole Cloud.', 'optimole-wp' ),
20822082
],
20832083
'help' => [
@@ -2350,21 +2350,21 @@ private function get_active_notices_count() {
23502350
}
23512351

23522352
/**
2353-
* Mark the users that are on free plan and have offload enabled.
2353+
* Mark if the user had offloading enabled on first run.
23542354
*
2355-
* Used for displaying a notice after plugin update about offload restrictions.
2355+
* If it is an old free user that had offloading enabled, we will use the mark to show a notice about the plan changes.
23562356
*
23572357
* @return void
23582358
*/
2359-
public function mark_free_user_with_offload() {
2359+
public function mark_user_with_offload() {
23602360
if ( ! $this->settings->is_connected() ) {
23612361
return;
23622362
}
23632363

2364-
if ( false !== get_option( 'optml_free_user_with_offload', false ) ) {
2364+
if ( false !== get_option( 'optml_has_offloading_enabled_on_upgrade', false ) ) {
23652365
return;
23662366
}
23672367

2368-
update_option( 'optml_free_user_with_offload', $this->settings->is_offload_enabled() ? 'yes' : 'no' );
2368+
update_option( 'optml_has_offloading_enabled_on_upgrade', $this->settings->is_offload_enabled() ? 'yes' : 'no' );
23692369
}
23702370
}

0 commit comments

Comments
 (0)