• Resolved kreditos24

    (@kreditos24)


    How to create a link to pdf on the payment page so that a buyer who has not entered an e-mail can download an invoice directly from the site?

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Contributor alexmigf

    (@alexmigf)

    Hello @kreditos24

    Should be possible to add a PDF link with the shortcode, but only in the “Thank you” page because it’s when the order is available and consequently the PDF Invoice.

    Hope that helps!

    Thread Starter kreditos24

    (@kreditos24)

    Yes, that’s what you need. Where can I find the Thank You page to edit? Divi theme on Woocomerce?

    Thread Starter kreditos24

    (@kreditos24)

    and how do I replace the id with the customer’s order number?
    [wcpdf_download_invoice link_text = “Upload invoice” order_id = ” 23″]

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @kreditos24

    Please try adding the code snippet below to your theme functions.php file:

    add_action( 'woocommerce_thankyou', function() {
    	echo do_shortcode('[wcpdf_download_invoice]');
    });

    If you never worked with filters/actions please read this documentation page: How to use filters

    Thread Starter kreditos24

    (@kreditos24)

    Thank you. Everything worked out. Used Code Snippets
    Pasted the code
    add_action (‘woocommerce_thankyou’, function () {
    echo do_shortcode (‘[wcpdf_download_invoice]’);
    });
    Sun works

    Thread Starter kreditos24

    (@kreditos24)

    I did everything as shown, but in the chrome browser it is normal, and in the opera it is not shown ” download PDF”

    Plugin Contributor Ewout

    (@pomegranate)

    That’s quite strange – first of all because the button is added to the page on the server (so it should be added regardless of the browser) and second because Opera uses the Chromium engine so technically it’s the same browser (with a different interface). Could you show a screenshot of both?

    Thread Starter kreditos24

    (@kreditos24)

    Opera https://prnt.sc/w71go1
    Chrome – https://prnt.sc/w71hjo

    I look at the html code
    Opera https://prnt.sc/w71j2n
    Chrome – https://prnt.sc/w71mpb

    Plugin Contributor Ewout

    (@pomegranate)

    The Opera screenshot is missing a lot more, such as the billing and shipping address. Did you place the order in Opera or did you copy the URL from Chrome to Opera?

    Thread Starter kreditos24

    (@kreditos24)

    Separately designed in Opera, separately in Chrome
    I can see that part of the code is missing, but I don’t know why. If you remove the PDF output code then everything will be fine in Opera

    Plugin Contributor alexmigf

    (@alexmigf)

    Hi @kreditos24

    If you remove the shortcode the addresses are showed in both browsers?

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Create pdf link on payment page’ is closed to new replies.