Format datetime

This commit is contained in:
Gerhard Potgieter 2018-04-11 08:41:57 +02:00
parent 19b7052a12
commit 25971b88b9
1 changed files with 3 additions and 3 deletions

View File

@ -303,7 +303,7 @@ class WC_Tracker {
*
* @return array
*/
private static function get_orders() {
public static function get_orders() {
$orders = array();
$order_counts = self::get_order_counts();
@ -500,7 +500,7 @@ class WC_Tracker {
);
if ( ! empty( $orders ) ) {
$order = $orders[0];
return $order->get_date_created();
return $order->get_date_created()->format( 'Y-m-d' );
} else {
return '-';
}
@ -521,7 +521,7 @@ class WC_Tracker {
);
if ( ! empty( $orders ) ) {
$order = $orders[0];
return $order->get_date_created();
return $order->get_date_created()->format( 'Y-m-d' );
} else {
return '-';
}