From 455c1c42d02f0c74eeaf8c20477b36d10b008f2b Mon Sep 17 00:00:00 2001 From: Rami Yushuvaev Date: Wed, 18 Mar 2026 13:50:03 +0200 Subject: [PATCH 1/2] [APP-2533] Add renewal banner for Ally --- modules/settings/notices/renewal-notice.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/settings/notices/renewal-notice.php b/modules/settings/notices/renewal-notice.php index 48fd5218..4af84913 100644 --- a/modules/settings/notices/renewal-notice.php +++ b/modules/settings/notices/renewal-notice.php @@ -19,8 +19,6 @@ class Renewal_Notice extends Notice_Base { const DISMISSED_AT_USER_META = 'ea11y_renewal_notice_dismissed_at'; - const MS_IN_ONE_DAY = 86400000; - /** * @var bool */ @@ -84,7 +82,7 @@ private function get_notice_icon( $type ) { } public function get_renewal_text(): array { - if ( $this->days_diff <= 30 && $this->days_diff > 0 ) { + if ( 1 === 1 ) { return [ 'title' => esc_html__( 'Ally Subscription Ending Soon!', 'pojo-accessibility' ), 'description' => esc_html__( 'Renew now to keep access to Ally Assistant and continue improving your website\'s accessibility with guided fixes and scans.', 'pojo-accessibility' ), @@ -157,7 +155,7 @@ public function is_dismissed(): bool { if ( ! $dismissed_at || ! is_numeric( $dismissed_at ) ) { return false; } - return ( time() * 1000 - (int) $dismissed_at ) < self::MS_IN_ONE_DAY; + return ( time() - (int) $dismissed_at ) < DAY_IN_SECONDS; } public function dismiss_per_user(): void { @@ -165,7 +163,7 @@ public function dismiss_per_user(): void { if ( ! $user_id ) { wp_send_json_error( [ 'message' => 'Invalid user' ] ); } - update_user_meta( $user_id, self::DISMISSED_AT_USER_META, (string) ( time() * 1000 ) ); + update_user_meta( $user_id, self::DISMISSED_AT_USER_META, (string) time() ); } public function maybe_set_conditions() { From 8339bb4782a9e174aa381bfbeaf8e1bc38760c75 Mon Sep 17 00:00:00 2001 From: Rami Yushuvaev Date: Wed, 18 Mar 2026 13:52:58 +0200 Subject: [PATCH 2/2] [APP-2533] Add renewal banner for Ally --- modules/settings/notices/renewal-notice.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/settings/notices/renewal-notice.php b/modules/settings/notices/renewal-notice.php index 4af84913..0eff1046 100644 --- a/modules/settings/notices/renewal-notice.php +++ b/modules/settings/notices/renewal-notice.php @@ -82,7 +82,7 @@ private function get_notice_icon( $type ) { } public function get_renewal_text(): array { - if ( 1 === 1 ) { + if ( $this->days_diff <= 30 && $this->days_diff > 0 ) { return [ 'title' => esc_html__( 'Ally Subscription Ending Soon!', 'pojo-accessibility' ), 'description' => esc_html__( 'Renew now to keep access to Ally Assistant and continue improving your website\'s accessibility with guided fixes and scans.', 'pojo-accessibility' ),