Skip to content

Commit

Permalink
~ Fixed: minor bug.
Browse files Browse the repository at this point in the history
  • Loading branch information
tungnxt89 committed Oct 23, 2024
1 parent 5293faa commit e3460e2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
11 changes: 11 additions & 0 deletions inc/class-lp-datetime.php
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ public function getTimestamp(): int {
return $date->getTimestamp();
}

/**
* Get timestamp of Date in local time.
* Note: timestamp before handle must timezone is GMT+0
*
* @return int
* @since 4.2.7.3
*/
public function getTimestampLocal(): int {
return $this->getTimestamp() + get_option( 'gmt_offset' ) * HOUR_IN_SECONDS;
}

/**
* Get string plural duration.
*
Expand Down
2 changes: 1 addition & 1 deletion inc/order/class-lp-order.php
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ public function get_all_items() {
"SELECT item_id, item_type
From $table_order_items
WHERE order_id = %d",
$this->get_id(),
$this->get_id()
);

return $wpdb->get_results( $query, ARRAY_A );
Expand Down

0 comments on commit e3460e2

Please sign in to comment.