Wrong output timestamp order updates
-
Hello,
Wordpress: 5.4
Woocommerce: 4.0.1
PHP: 7.0
Site Health: no issuesI am at a stage where I test orders and found that when a customer goes to his/her account and views their order, they are facing a bizar string that normally should be a date and/or timestamp for their order updates (which is added to the customers order via the backend by the admin as a note).
760+03:004, b+03:004, 47+03:004, 47pm4pm:
I checked the codes in both the Woocommerce template and the active theme files which are:
view-order.php
These are the lines causing the output in both files:
<p class="woocommerce-OrderUpdate-meta meta"><?php echo date_i18n( esc_html__( 'l jS \o\f F Y, h:ia', 'woocommerce' ), strtotime( $note->comment_date ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
<p class="woocommerce-OrderUpdate-meta meta"><?php echo date_i18n( esc_html__( 'l jS \o\f F Y, h:ia', 'porto' ), strtotime( $note->comment_date ) ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?></p>
I tried googling but I did not understand, which is why I am asking here:
What is the problem?
- The topic ‘Wrong output timestamp order updates’ is closed to new replies.