Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Darren Peyou

    (@dpeyou)

    Hello @denism300,

    I’m not sure that would make any sense to us because the shortcode already has a unique identifier, starting with div.wpmenucart-shortcode

    Thread Starter denism300

    (@denism300)

    Perhaps we are talking about different shortcodes? I meant these: wcpdf_download_invoice and wcpdf_download_pdf.
    The generate_document_link_shortcode function is responsible for their output, which outputs the following code :

    return sprintf( '<p><a href="%s" target="_blank">%s</a></p>', esc_url( $pdf_url ), esc_html( $link_text ) );

    There is no wrapper div.wpmenucart-shortcode in this code and it is not displayed on the site.

    The plugin version is the latest at the time of writing this message

    Plugin Contributor Yordan Soares

    (@yordansoares)

    Hi @denism300,

    Since v3.6.2, launched yesterday, you can pass both classes and an ID to the PDF document shortcode, like this:

    [wcpdf_download_pdf document_type="invoice" link_text="Click here to Download the PDF invoice" order_id="123" id="invoice-link" class="pdf-invoice pdf-shortcode"]

    If you want to learn more, see the Docs’ article here: https://docs.wpovernight.com/woocommerce-pdf-invoices-packing-slips/download-invoice-link-with-shortcode/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Shordcode css classes’ is closed to new replies.