Title: Shordcode css classes
Last modified: August 16, 2023

---

# Shordcode css classes

 *  Resolved [denism300](https://wordpress.org/support/users/denism300/)
 * (@denism300)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/shordcode-css-classes/)
 * Add the ability to pass css classes to the shortcode to make it easier to style
   the link.

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

 *  Plugin Contributor [Darren Peyou](https://wordpress.org/support/users/dpeyou/)
 * (@dpeyou)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/shordcode-css-classes/#post-16978443)
 * Hello [@denism300](https://wordpress.org/support/users/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](https://wordpress.org/support/users/denism300/)
 * (@denism300)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/shordcode-css-classes/#post-16979527)
 * 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](https://wordpress.org/support/users/yordansoares/)
 * (@yordansoares)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/shordcode-css-classes/#post-16999356)
 * Hi [@denism300](https://wordpress.org/support/users/denism300/),
 * Since **v3.6.2**, launched yesterday, you can pass both classes and an ID to 
   the PDF document shortcode, like this:
 *     ```wp-block-code
       [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/](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.

 * ![](https://ps.w.org/woocommerce-pdf-invoices-packing-slips/assets/icon-256x256.
   png?rev=2189942)
 * [PDF Invoices & Packing Slips for WooCommerce](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce-pdf-invoices-packing-slips/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce-pdf-invoices-packing-slips/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Yordan Soares](https://wordpress.org/support/users/yordansoares/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/shordcode-css-classes/#post-16999356)
 * Status: resolved