Boopathi Rajan - PHP Developer at ImagiNET Ventures Private Limited

Get woocommerce my account page URL programmatically

For our customization want to get woocommerce my account page URL programmatically then place the following snippet!. Here $myaccount_page_url returns the woocommerce my account page URL.

$myaccount_page_id = get_option( 'woocommerce_myaccount_page_id' );
if ( $myaccount_page_id ) {
  $myaccount_page_url = get_permalink( $myaccount_page_id );
}

Have any doubt, then comment here!