Back to PhocacartOrder class

Method getInvoiceDate

public static
getInvoiceDate
(mixed $orderId, mixed $date = false, mixed $formatOutput = '')

Method getInvoiceDate - Source code

public static function getInvoiceDate($orderId, $date = false, $formatOutput = '')
{
    $date = !$date ? self::getOrderDate($orderId) : $date;
    $dateTime = new DateTime($date);
    if ($formatOutput != '') {
        return HTMLHelper::date($dateTime->format('Y-m-d h:m:s'), $formatOutput);
    } else {
        return $dateTime->format('Y-m-d h:m:s');
    }
}