Skip to content

Commit 825f370

Browse files
Use renews_on and add upgrade link
1 parent 39fe231 commit 825f370

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

Diff for: assets/src/dashboard/parts/components/Modal.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,11 @@ export default function Modal({ icon, labels = {}, onRequestClose = () => {}, on
5858
{ labels.action }
5959
</Button>
6060
{ labels.secondaryAction && (
61-
<Button variant="link" className={ actionButtonClasses } onClick={ onSecondaryAction }>
61+
<Button
62+
variant="default"
63+
className="optml__button flex justify-center rounded font-bold min-h-40"
64+
onClick={ onSecondaryAction }
65+
>
6266
{ labels.secondaryAction }
6367
</Button>
6468
) }

Diff for: inc/admin.php

+7-3
Original file line numberDiff line numberDiff line change
@@ -1980,9 +1980,9 @@ private function get_dashboard_strings() {
19801980
'cloud_library_btn_text' => __( 'Go to Cloud Library', 'optimole-wp' ),
19811981
'cloud_library_btn_link' => add_query_arg( 'page', 'optimole-dam', admin_url( 'admin.php' ) ),
19821982
'exceed_plan_quota_notice_title' => __( 'Your site has already reached over 50% of your monthly visits limit within just two weeks.', 'optimole-wp' ),
1983-
'exceed_plan_quota_notice_description' => __( 'Based on this trend, you are likely to exceed your free quota before the month ends. To avoid any disruption in service, we strongly recommend upgrading your plan or waiting until your traffic stabilizes before offloading your images. Do you still wish to proceed?', 'optimole-wp' ),
1983+
'exceed_plan_quota_notice_description' => sprintf( /* translators: 1 is the starting anchor tag, 2 is the ending anchor tag */ __( 'Based on this trend, you are likely to exceed your free quota before the month ends. To avoid any disruption in service, we strongly recommend %1$supgrading%2$s your plan or waiting until your traffic stabilizes before offloading your images. Do you still wish to proceed?', 'optimole-wp' ), '<a style="white-space: nowrap;" target=”_blank” href="https://dashboard.optimole.com/settings/billing/">', '</a>' ),
19841984
'exceed_plan_quota_notice_start_action' => __( 'Yes, Transfer to Optimole Cloud', 'optimole-wp' ),
1985-
'exceed_plan_quota_notice_secondary_action' => __( 'No', 'optimole-wp' ),
1985+
'exceed_plan_quota_notice_secondary_action' => __( 'No, keep images on my website', 'optimole-wp' ),
19861986
],
19871987
'help' => [
19881988
'section_one_title' => __( 'Help and Support', 'optimole-wp' ),
@@ -2202,7 +2202,11 @@ public function should_show_exceed_quota_warning() {
22022202
return false;
22032203
}
22042204

2205-
if ( $service_data['days_since_registration'] <= 14 ) {
2205+
$renews_on = $service_data['renews_on'];
2206+
$timestamp_before_two_weeks = strtotime( '-2 weeks', $renews_on );
2207+
$today_timestamp = strtotime( 'today' );
2208+
2209+
if ( $timestamp_before_two_weeks <= $today_timestamp ) {
22062210
return false;
22072211
}
22082212

0 commit comments

Comments
 (0)