• Resolved mkornegay2

    (@mkornegay2)


    How do I have a print/download invoice link on the ‘Thankyou.php’ or Completed order page. I tried to add the php function and I cannot get it to work.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Bas Elbers

    (@baaaaas)

    Below code will show a download button.

    
    $order_id = method_exists( 'WC_Order', 'get_id' ) ? $this->order->get_id() : $this->order->id;
    echo do_shortcode( '[bewpi-download-invoice title="Download (PDF) Invoice {formatted_invoice_number}" order_id="' . $order_id . '"]' );
    
    Thread Starter mkornegay2

    (@mkornegay2)

    Sorry but I could not get this to work. I copy and pasted this exact code in my thankyou.php template and either nothing shows up or the code prints on the screen. I cannot place an order b/c it is live. I can only view the page template through the url.

    I have tried starting the string off with <p> tags and no good. Please show the full syntax.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Print/Download Invoice’ is closed to new replies.