title: WooCommerce My Account custom endpoint menu item
body: <p>I am working on a project where my account page is a homepage. So what I did I have created a page that holding the shortcode <code>[woocommerce_my_account]</code> and made this page homepage from Dashboard-&gt;Settings-&gt;Reading. Everything works. I have this working endpoints too:</p>
  <ul>
  <li>mydomain.com/orders</li>
  <li>mydomain.com/edit-address</li>
  </ul>
  <p>But I am facing trouble when I am making a custom myaccount endpoint. I am doing it in this traditional way:</p>
  <pre><code>add_action('woocommerce_account_custom-endpoint_endpoint', function(){
      echo 'hello'; 
  } );
  
  add_action('init', function() {
      add_rewrite_endpoint('custom-endpoint', EP_ROOT | EP_PAGES); 
  });
  </code></pre>
  <p>But mydomain.com/custom-endpoint is not pointing to my account page, it is pointing to the index.php or page.php (WordPress template hierarchy).</p>
  <p>I am curious to know why it is happening?</p>