php 如何自定义woocommerce“我的帐户”页面?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/44757798/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How can I Customize woocommerce "My Account" page?
提问by Bad Dobby
I'm making an online shop page with Woocommerce.
我正在使用 Woocommerce 制作在线商店页面。
When someone go to "My Account" page to see their recent ordering history or shipping address, My Account page always shows useless welcome message page (which named Dashboard) and customers have to click additional buttons to see useful information they need.
当有人进入“我的账户”页面查看他们最近的订购记录或送货地址时,我的账户页面总是显示无用的欢迎信息页面(名为仪表板),客户必须单击其他按钮才能看到他们需要的有用信息。
Is there some easy ways to customize the "Dashboard" ? I want to show recent order history and shipping address in there instead of welcome message.
是否有一些简单的方法可以自定义“仪表板”?我想在那里显示最近的订单历史记录和送货地址,而不是欢迎信息。
回答by pomaaa
You can find all the Woocommerce "My Account" page templates in the following folder:
您可以在以下文件夹中找到所有 Woocommerce“我的帐户”页面模板:
wp-content/plugins/woocommerce/templates/myaccount
If you wish to edit any of it I would suggest you to open your theme directory and add a new folder called "woocommerce", and inside it you can copy any files from the original however keep the same file structure but removing the /templates/ subdirectory.
如果您想编辑其中任何一个,我建议您打开主题目录并添加一个名为“woocommerce”的新文件夹,在其中您可以复制原始文件中的任何文件,但保持相同的文件结构,但删除 /templates/子目录。
For more info on editing Woocommerce templates you can read here.
有关编辑 Woocommerce 模板的更多信息,您可以在这里阅读。

