title: Get View Order URL for custom email in WooCommerce
body: <p>I want to get the <strong>URL of the Order Details page</strong> from where user can see their  order details, because using some 3rd party API I send mail to the customer after the product is shipped.</p>
  
  <p>I tried this code</p>
  
  <pre><code>$order = wc_get_order(109);
  $public_view_order_url = esc_url( $order-&gt;get_view_order_url() );
  echo $public_view_order_url; //http://example.com/my-account/view-order/109/
  </code></pre>
  
  <p>but the URL generated by ^^ above code only works for logged in customer. Is it possible to get a <strong>Public URL</strong> so that user don't have to logged in because most of the customer don't have any account. I know for security reason email id and invoice number is needed.</p>
  
  <p>One solution that I think is by creating an <em>custom page</em> which will accept <code>order_id</code>, <code>order_key</code> and <code>email_id</code> in GET parameter and query it and display the result; the whole thing I have to create but is there any WooCommerce function/hook for this? </p>
  
  <p>I googled it and also spend time in Woo doc but the result was negative,</p>
  
  <p>Any help or suggation will be very helpfull for me.</p>
  
  <p>Thanks.</p>