• Hello,

    I want to display time of order in WooCommerce order emails.

    I have copied file /wp-content/plugins/woocommerce/templates/emails/email-order-details.php to /wp-content/my-child-theme/woocommerce/emails/email-order-details.php, and in that file, on the line 34 there is code that displays order date:

    echo wp_kses_post( $before . sprintf( __( '[Order #%s]', 'woocommerce' ) . $after . ' (<time datetime="%s">%s</time>)', $order->get_order_number(), $order->get_date_created()->format( 'c' ), wc_format_datetime( $order->get_date_created() ) ) );

    How can I modify that code so that in addition to displaying the date, it also displays the time of the order?

    I really appreciate any help you can provide.

    Best regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello there,

    I understand you would like to display the order time in the customer email notification, correct?

    Please refer to this article.

    If there are any questions let us know.

    Thread Starter Milos Spasic

    (@spale)

    Hello Igor,

    Thanks for the link, I have successfully displayed time of order in WooCommerce emails.

    Best regards

    Glad to hear it – thanks for letting us know!

    If you have further questions, feel free to create a new thread.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Display time of order in WooCommerce emails’ is closed to new replies.