get woocommerce My account page link


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="">
        <img src="" alt="Product Rating">

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

Ans 7 months 0 Answers 148 views 0

Leave an answer