WooCommerce MyAccount custom endpoint

I was trying to add a tab in WooCommerce my account page to show enrolled courses directly there from the Learning Management System. I’ve referred this WooCommerce guide. Following is the code I’ve used, I’ve commented in the code block, so each function is self explanatory. The LMS plugin I’ve used here is LearnDash LMS. What we basically trying to do here is adding  a WooCommerce MyAccount custom endpoint.

Continue reading