diff --git a/client-mu-plugins/goodbids/src/classes/Auctions/Auction.php b/client-mu-plugins/goodbids/src/classes/Auctions/Auction.php index 10a0b4f4..1b62ca7d 100644 --- a/client-mu-plugins/goodbids/src/classes/Auctions/Auction.php +++ b/client-mu-plugins/goodbids/src/classes/Auctions/Auction.php @@ -539,19 +539,10 @@ public function is_ending_soon(): bool { return false; } - // commenting out extension logic for now // TODO add a variable in the UI for 'ending soon notification threshold' - // $extension = $this->get_bid_extension(); - - $static_threshold_min = 60*60; // 60 minutes - $static_threshold_max = 60*115; // 115 minutes - - // if ( ! $extension ) { - // return false; - // } - - // Set threshold to be static - // $threshold = intval( round( $extension * .3 ) ); + + $static_threshold_min = HOUR_IN_SECONDS * 1; // 60 minutes + $static_threshold_max = HOUR_IN_SECONDS * 2; // 120 minutes try { $end = new DateTimeImmutable( $end_date_time, wp_timezone() ); @@ -570,7 +561,7 @@ public function is_ending_soon(): bool { // and the diff is more than the min for the threshold // (i.e., if it falls within the threshold), // then it's ending soon. - $ending_soon = $static_threshold_max > $diff && $static_threshold_min < $diff; + $ending_soon = $static_threshold_max > $diff && $static_threshold_min <= $diff; return $ending_soon; }