Forums › PDF Invoicing for WooCommerce › Request for complete list of shortcodes available in the plugin
- Support forum for the PDF Invoices & Packing Slips Generator for WooCommerce.
- This topic has 3 replies, 3 voices, and was last updated 1 month, 2 weeks ago by
Taha.
-
AuthorPosts
-
July 18, 2025 at 7:10 am #169499
Marek Mitko
ParticipantHi,
I’m currently customizing the invoice templates using the PDF Invoices & Packing Slips Generator for WooCommerce plugin and would like to ask:Could you please provide a full list of all available shortcodes supported by the plugin (both standard and advanced/custom ones)?
I’m particularly interested in shortcodes that return:- Item-level tax (e.g. item_single_tax)
- Item-level total tax (e.g. item_total_tax)
If there is any documentation or reference guide that contains all shortcode variables and formatting options, please share the link as well.
Thanks in advance!
-
This topic was modified 7 months ago by
Marek Mitko.
December 16, 2025 at 7:39 am #176960Roland Jungwirth
ParticipantDid you ever get an answer to this?
December 16, 2025 at 9:17 am #176965Roland Jungwirth
ParticipantThe one thing that I found is this code: https://github.com/wpcodefactory/pdf-invoicing-for-woocommerce/blob/master/includes/class-alg-wc-pdf-invoicing-shortcodes.php – the available shortcodes are in the array prop_aliases.
December 24, 2025 at 7:23 pm #177349Hello Marek and Roland,
I hope you are doing well. Please accept our sincere apologies for the delayed response. Here is an update regarding your request for custom tax shortcodes in the PDF invoice.
Available Shortcodes:
-
Item-level total tax: This can be used directly with the shortcode
[item_total_tax]. -
Item-level tax per item: There is no default shortcode for this, but you can add a custom shortcode by implementing the following PHP snippet:
add_shortcode( 'item_single_tax', function ( $atts ) {// Check if WooCommerce PDF Invoicing plugin existsif ( ! function_exists( 'alg_wc_pdf_invoicing' ) ) {return ''; // PDF plugin not active}// Check if shortcodes class existsif ( ! isset( alg_wc_pdf_invoicing()->core->shortcodes ) ) {return '';}// Execute [item_qty] shortcode and get the value$qty = do_shortcode( '[item_qty]' );// Prevent division by zeroif ( empty( $qty ) || $qty == 0 ) {return '';}// Execute [item_total_tax] shortcode with divide attribute$total_tax = do_shortcode( "[item_total_tax divide='{$qty}']" );// Return properly formattedreturn alg_wc_pdf_invoicing()->core->shortcodes->return_prop( $total_tax, $atts );} );-
Once this snippet is added to your theme’s
functions.phpfile or via a code snippet plugin, you can use[item_single_tax]in your PDF HTML template.
Guidance Screenshots:
For visual guidance, please refer to the attached screenshots:-
https://mega.nz/file/LEEl2DgA#2tQfwbYQdXk5EuugVIygoCIzHJbIcohJNuw-6Z4uz0A
-
https://mega.nz/file/vZlSyYpB#39klxGEk9ctHzawtPI5yBTkPTfbblTjCH6t54Bxwehc
Best regards,
Taha -
AuthorPosts
- You must be logged in to reply to this topic.