• Hello everybody,
    I have made a custom template for woocommerce-pdf-invoice. This was working until an update recently.

    I have made several var_dumps to find out what info was missing, and I found out that several item info was gone. I need help to get the tax-class rate and the item-tax info.

    Can someone point me in the right direction how to get all the order-item info working again? I can do the rest myself ofcourse.

    This is also a warning to check your invoices if you have made changes to the templates.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bas Elbers

    (@baaaaas)

    Can you send a screenshot? I am not sure I understand what you are trying to say. It is recommended to update your custom template with the latest template from the plugin.

    Thread Starter thetankgirl

    (@thetankgirl)

    Thank you so much for replying!

    Ik denk dat dit in het Nederlands makkelijker gaat.

    Ik heb het probleem gevonden en verholpen:

    Dit had ik eerst:
    foreach( $order->get_items() as $item ){
    en dit is het geworden
    foreach( $order->get_items() as $item_id => $item ){

    Dit is om de btw tarieven over de verzendkosten in verhouding te kunnen berekenen (moeilijk uit te leggen).
    Dat werkt nu, maar nu zou ik graag willen weten hoe ik de facturen opnieuw kan laten genereren. Ook al verwijder ik ze handmatig in de attachments directory, dan alsnog pakt hij de ‘oude layout’ van de template.

    De nieuwe bestellingen pakken wel de nieuwe layout van de template.
    Let op: in de database worden mijn berekeningen / aantekeningen niet opgeslagen, dus dat zou het niet kunnen zijn.

    In English:
    The problem was

    foreach( $order->get_items() as $item ){

    It needed to become this:

    foreach( $order->get_items() as $item_id => $item ){

    Now I need to regenerate the invoices, to include the new layout of the template, how do I do this?

    Plugin Author Bas Elbers

    (@baaaaas)

    To regenerate the pdf invoices, make sure to delete them first. If they are already sent to the customer, please check the FAQ.

    Hope this helps!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘warning: order item info on custom template not working anymore’ is closed to new replies.