Skip to content

Commit

Permalink
= 4.2.6.6 =
Browse files Browse the repository at this point in the history
~ Compare date sale course via timezone WP
  • Loading branch information
tungnxt89 committed May 8, 2024
1 parent 17cd206 commit 9e8f82d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion inc/course/abstract-course.php
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,10 @@ public function has_sale_price() {

// Check in days sale
if ( $has_sale_price && '' !== $start_date && '' !== $end_date ) {
$now = time();
$nowObj = new LP_Datetime();
// Compare via timezone WP
$nowStr = $nowObj->toSql( true );
$now = strtotime($nowStr);
$end = strtotime( $end_date );
$start = strtotime( $start_date );

Expand Down

0 comments on commit 9e8f82d

Please sign in to comment.