I'm running the latest version of WordPress (4.9.2) and WooCommerce (3.2.6) and I'm having issues overwriting the My Account
template.
I've created a file in my theme:
theme-name/woocommerce/myaccount/my-account.php
I have a page in my WP Admin
with the post_content
set to:
[woocommerce_my_account]
However, when I open the link, http://example.com/en/my-account
, it's showing the default index.php
.
If I put the following code in my index, I get to see the account page:
do_shortcode('[woocommerce_my_account]');
I've also made sure that my WooCommerce account page is set to the right one in WooCommerce > Settings > Account > My Account Page.
I can see in the body of the rendered page that has the following classes
page-template-default page page-id-8 logged-in desktop woocommerce-account woocommerce-page
Does anyone know why it's not displaying the page properly?
index.php
" you mean the WooCommerce part isn't shown, but the regular page content is? Have you tried disabling all other plugins and using one of the default themes, without your modifications?index.php
.http://example.com/my-account/
? What's yourWordPress Address
andSite Address
settings inSettings > General
?