I have this problem also. They actually provided a way how to add a PDF download link on the Thank you page. Its in the this plugin’s FAQ. Have you tried it? Tell me if it works on your end
That code not working for me. Is there any way to fix that?
Try below code. It should work.
echo do_shortcode( '[bewpi-download-invoice title="Download (PDF) Invoice {formatted_invoice_number}" order_id="' . $order->get_id . '"]' );
Yeah this works for me now. Thanks a lot!
hi @baaaaas , the code dont work for me
i tried
<?phpecho do_shortcode( '[bewpi-download-invoice title="Download (PDF) Invoice {formatted_invoice_number}" order_id="' . $order->get_id . '"]' );?>
and
<?php $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 . '"]' ); ?>
but anything work
this is my complete code
<p class="woocommerce-notice woocommerce-notice--success woocommerce-thankyou-order-received"><?php echo apply_filters( 'woocommerce_thankyou_order_received_text', __( 'Thank you. Your order has been received.', 'woocommerce' ), $order ); ?></p>
<?php echo do_shortcode( '[bewpi-download-invoice title="Download (PDF) Invoice {formatted_invoice_number}" order_id="' . $order->get_id . '"]' );?>
thnkyou
ok works
echo do_shortcode( '[bewpi-download-invoice title="Download (PDF) Invoice {formatted_invoice_number}" order_id="' . $order->id . '"]' );
. $order->id .
not . $order->get_id .