Merge pull request #13042 from woocommerce/legacy-order-date-format

Fix legacy order dates format
This commit is contained in:
Mike Jolley 2017-02-06 12:51:41 +01:00 committed by GitHub
commit 09f7b0493e
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 ) {