get woocommerce My account page link

Question

I am trying to send an email to customer after purchased products and when customer click on the the link provided the email for rating the product it should redirect to customer’s account/My account page.
I put some code in functions.php to get the WooCommerce My Account URL:

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

I have customized into customer-completed-order.php and put this code

    <h2> Go to your account page for review </h2>
    <a href="http://animax.cf/product/happy-ninja/#reviews">
        <img src="http://animax.cf/wp-content/uploads/2015/12/product-reviews.png" alt="Product Rating">
    </a>

I want to get woocomerce myaccount url in above code. how should i do this.

0
Ans 7 months 0 Answers 148 views 0

Leave an answer