Show full date for future orders

This commit is contained in:
Caleb Burks 2018-02-19 21:25:03 -05:00
parent ab6b978399
commit 3d7f674c54
1 changed files with 2 additions and 1 deletions

View File

@ -223,7 +223,8 @@ class WC_Admin_List_Table_Orders extends WC_Admin_List_Table {
protected function render_order_date_column() {
$order_timestamp = $this->object->get_date_created()->getTimestamp();
if ( $order_timestamp > strtotime( '-1 day', current_time( 'timestamp', true ) ) ) {
// Check if the order was created within the last 24 hours, and not in the future.
if ( $order_timestamp > strtotime( '-1 day', current_time( 'timestamp', true ) ) && $order_timestamp < strtotime( '+1 second', current_time( 'timestamp', true ) ) ) {
$show_date = sprintf(
/* translators: %s: human-readable time difference */
_x( '%s ago', '%s = human-readable time difference', 'woocommerce' ),