I need to add custom item to WooCommerce My Account navigation. I can add the item with no problem. Since it is a link to user's profile I use the following code:
<?php
global $switched;
switch_to_blog(2);
?>
<a href=”<?php echo bp_loggedin_user_domain(); ?>”>Profile</a>
<?php restore_current_blog(); //switched back to main site ?>
First I switch to BuddyPress which handles users (multisite newtork). Then I use bp_loggedin_user_domain to get user profile url.
But the actual output of the link is incorrect, I get: www.domain.com/my-account/"www.subdomain.domain.com/members/profile/"
I know that My Account page treats all links as child pages with WooCommerce endpoints, but is there a way to get the external url there? Without WooCommerce's default domain.com/my-account/ prefix