Show full date for future orders
This commit is contained in:
parent
ab6b978399
commit
3d7f674c54
|
@ -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' ),
|
||||
|
|
Loading…
Reference in New Issue