I have created a new menu item to my my-account page in Woocommerce and I am wondering how I can create a theme file for it so I can add in some custom code to display orders and other backend stuff. Here is how I added the menu item
I duplicated the woocommerce/myaccount folder in my theme and added a 'your-approvals' page but can't get it to use that page.
add_action( 'init', 'metrodiamonds_add_endpoint' );
function metrodiamonds_add_endpoint() {
// WP_Rewrite is my Achilles' heel, so please do not ask me for detailed explanation
add_rewrite_endpoint( 'your-approvals', EP_PAGES );
}
How can I assign my themes/mytheme/woocmmerce/myaccount/your-approvals to the new menu item I created?
Thanks