• Resolved theinmarma



    Hi, I want to add custom and different messages with every product in the invoice.

    Product 1 (Message1)
    Product 2 (Message2)

    How can I add this?

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


    Hi @theinmarma,

    I have a couple of questions for you, before I can offer a better advice:

    1. Where do you want to display the custom messages?
    2. Can your customer buy two or more products with custom messages?
    Thread Starter theinmarma


    Hi @yordansoares

    Thanks for your reply.

    1. I want to display the custom message below the title of the product on the invoice.
    2. No, only a single product with a custom message.

    Plugin Contributor Yordan Soares


    Thanks for providing more details, @theinmarma!

    I think you could add a custom field to your products to manage the custom message (you could use Advanced Custom Fields), and show it in your PDF invoice using the customizer, included in the Premium Templates extension. This allows you to use blocks to tailor your PDF document, controlling the data elements: product columns, totals row, and order info through custom blocks.

    For your specific case, you could add the category below the product name using the {{product_custom_field::META_KEY}} placeholder, replacing META_KEY with the met key of your custom field, like this:

    A screenshot that displays the Product Custom Field placeholder

    Another way to do it is with some of PHP code. If you have PHP knowledge, you can use the wpo_wcpdf_after_item_meta action hook. See PDF template action hooks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add custom message for every product on invoice’ is closed to new replies.