Hi @w4yp01nt,
Thank you for reaching out!
If I understand correctly if you hover over the menu item, the …/my-account/… URL part is missing? How were menu items added to the header menu?
Hi Daniel,
You understand correctly. Many themes automatically add the account area menu items, as items in a user menu dropdown in the header of the website, for example. This effectively means, that these menu items will be available everywhere on the website quite commonly – but in cases like these, your internal linking breaks.
I have fixed it myself for now, by rewriting your URLs in my own functions.php file, but I think it would be good practice to account for this yourselves going forward
It’s quite simple to reproduce. Just print out the account area menu somewhere outside of the /my-account/ url path 👍
-
This reply was modified 8 months, 1 week ago by
w4yp01nt.
-
This reply was modified 8 months, 1 week ago by
w4yp01nt.
Hi @w4yp01nt,
Thank you for the details provided. We tried to reproduce the reported issue with no luck.
We added the following snippet of code in our theme’s functions.php file (Storefront theme) in order to print the My Account menu items in the header of the site:
function wc_menu() {
$endpoints = wc_get_account_menu_items();
echo '<ul>';
foreach ( $endpoints as $endpoint_key => $endpoint_name ) {
$endpoint_url = wc_get_account_endpoint_url( $endpoint_key );
echo '<li><a href="' . esc_url( $endpoint_url ) . '">' . esc_url( $endpoint_url ) . '</a></li>';
}
echo '</ul>';
}
add_action( 'wp_body_open', 'wc_menu' );
But the Subaccounts endpoint URL was printed correctly, even outside of the My Account area as you can see in the image below:

What happens if you try to add the above snippet to your site’s functions.php file?
We haven’t heard from you in a while so I’m going to go ahead and mark this thread as resolved.
If you have any other questions about the plugin, please start a new thread.