Fixed legacy date format

This commit is contained in:
Claudio Sanches 2017-02-01 10:11:19 +01:00
parent 247c9aff50
commit 54e35648e2
1 changed files with 3 additions and 3 deletions

View File

@ -402,13 +402,13 @@ abstract class WC_Abstract_Legacy_Order extends WC_Data {
wc_doing_it_wrong( $key, 'Order properties should not be accessed directly.', '2.7' );
if ( 'completed_date' === $key ) {
return $this->get_date_completed();
return date( 'Y-m-d H:i:s', $this->get_date_completed() );
} elseif ( 'paid_date' === $key ) {
return $this->get_date_paid();
} elseif ( 'modified_date' === $key ) {
return $this->get_date_modified();
return date( 'Y-m-d H:i:s', $this->get_date_modified() );
} elseif ( 'order_date' === $key ) {
return $this->get_date_created();
return date( 'Y-m-d H:i:s', $this->get_date_created() );
} elseif ( 'id' === $key ) {
return $this->get_id();
} elseif ( 'post' === $key ) {