Support » Plugin: WooCommerce PDF Invoices & Packing Slips » How to Change the Label for Invoice & Discount

  • Resolved dsteam


    Dear Sir,
    May i know How to Change the Label for Invoice & Discount on the PDF Invoice?
    Please advise.


    • This topic was modified 1 year, 11 months ago by dsteam.
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support kluver


    Hi @dsteam,

    The easiest way is to purchase our PDF Invoices & Packing Slips Bundle. With this you would get access to our Pro version that lets you change the document title from within the settings. And you get access to our Customizer through the Premium Templates extension. This lets you add all kinds of order data and you can choose any label you like.

    To achieve the same with our free version you will have to create a custom template and add filter to your functions.php. This requires soms coding skills.

    First create a custom template. Here you can find how: Creating a custom template
    You then have to change this line in all the documents you would like ‘Discount’ to be changed:
    <th class="description"><span><?php echo $total_data['label']; ?></span></th>

    And change it to this:
    <th class="description"><span><?php echo ($total_data['label'] == 'Discount') ? 'YOUR LABEL NAME' : $total_data['label']; ?></span></th>

    After this is done you will need to add a filter to your functions.php to change the document title from ‘Invoice’ to anything you like. Here you can find how: Changing the document title

    If you never worked with filters or functions.php please read this: How to use filters

    I hope this helps you in the right direction!]

    With kind regards,


    Hi Michael,

    Thanks for your reply, i have successful change the “Invoice” to “Tax Invoice”
    with add a filter.

    And i had done the creating custom template and upload to my child theme, but unable located this code
    <th class="description"><span><?php echo $total_data['label']; ?></span></th>
    at invoice.php
    Please advise & TQ very much.

    Another question, is it i can only purchase the “WooCommerce PDF Invoices & Packing Slips Premium Templates” for customize the invoice template? or it must bundle together with “WooCommerce PDF Invoices & Packing Slips Professional”?

    Thanks Again

    Plugin Author Ewout


    Hi Keith,
    The example from Michael was accidentally based on one of the Premium Templates. For the simple template it would be this line:

    <th class="description"><?php echo $total['label']; ?></th>

    changed to:

    <th class="description"><?php echo ($total['label'] == 'Discount') ? 'YOUR LABEL NAME' : $total['label']; ?></th>

    The Premium Templates extension works just as well without the Professional extension, although they don’t share any functionality. You can read more about this on our site:
    Premium Templates
    Professional extension

    With the premium templates extension you wouldn’t need to make the above edits, as you can do this via the customizer in that case.

    Hope that helps!

    Hi Ewout,
    Thanks for your reply, finally i have successful made it.
    I am interesting for the Premium Templates, may i know the Premium Templates able to add in the coupon code into the invoice?

    Plugin Author Ewout


    yes, either by using {{used_coupons}} in a custom block (which can be placed in multiple locations) or added to the discount totals label in the customizer settings for that total row.

    If you have any other pre-sales questions, please send an email to Officially does not allow us to use these forums for questions related to paid content.


Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to Change the Label for Invoice & Discount’ is closed to new replies.