• Resolved flinty2000

    (@flinty2000)


    Hello,

    Nice plugin! We are wanting to add the shortcode [wcpdf_download_pdf] to a button in elementor so that when the user clocks on it the PDF invoice will show for the user.

    If we just insert the shortcode [wcpdf_download_pdf] it produces a link that is not obvious or in style with the rest of the page which is why we are wanting to use the button element.

    Can anyone advise on how to do this?

    Thank you in advance

Viewing 1 replies (of 1 total)
  • Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @flinty2000,

    If you use the free version of Elementor only, you can pass the CSS classes used by them to style buttons, within the shortcode parameters:

    [wcpdf_download_pdf link_text="Download invoice" class="elementor-button elementor-button-link elementor-size-sm"]

    In the case that you also have Elementor Pro, then would only need to configure the source of the button link as shortcode, using the dynamic tags, and passing the [wcpdf_document_link] shortcode instead:

    Please note that the shortcodes above get the order ID dynamically if you use them within the order context. If that is not the case, then you would need to pass the ID within the order_id parameter, this way:

    [wcpdf_download_pdf order_id="123" link_text="Download invoice" class="elementor-button elementor-button-link elementor-size-sm"]

    Or:

    [wcpdf_document_link order_id="123"]
Viewing 1 replies (of 1 total)

The topic ‘Embed PDF Invoice Shortcode Into Elementor Button’ is closed to new replies.