WooCommerce商城前端订单显示完整日期时间

2019-03-1021:02:06网站建设与开发Comments2,707 views字数 490阅读模式

使用WooCommerce的时候,用户提交的订单在前端用户中心中只显示日期不显示日期,下面就说下如何显示完整的日期时间。文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/9905.html

WooCommerce商城前端订单显示完整日期时间文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/9905.html

操作步骤

先从插件目录【woocommerce\templates\myaccount】目录中找到【orders.php】文件打开他并在大概第55行找到如下代码文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/9905.html

  1. <time datetime="<?php echo esc_attr( $order->get_date_created()->date( 'c' ) ); ?>"><?php echo esc_html( wc_format_datetime( $order->get_date_created()) ); ?></time>

将其改为文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/9905.html

  1. <time datetime="<?php echo esc_attr( $order->get_date_created()->date( 'c' ) ); ?>"><?php echo esc_html( wc_format_datetime( $order->get_date_created()  ,'Y年n月j日G时i分s秒') ); ?></time>

WooCommerce商城前端订单显示完整日期时间文章源自菜鸟学院-https://www.cainiaoxueyuan.com/cms/9905.html

  • 本站内容整理自互联网,仅提供信息存储空间服务,以方便学习之用。如对文章、图片、字体等版权有疑问,请在下方留言,管理员看到后,将第一时间进行处理。
  • 转载请务必保留本文链接:https://www.cainiaoxueyuan.com/cms/9905.html

Comment

匿名网友 填写信息

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定