• Resolved flyangel

    (@flyangel)


    The name of my tax has changed.
    Now I need the old invoices (of the last three months) with the new tax name printed.
    If I try to download an old bill in PDF, there is still the tax with the old name.

    How can I regenerate an old invoice?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Contributor Ewout

    (@pomegranate)

    Hi! To regenerate an old invoice (while keeping the invoice number & date), you can temporarily enable the option ‘Always use most current settings’ under WooCommerce > PDF Invoices > Documents > Invoice. Any invoices you open while this setting is enabled will be updated with the latest information. I recommend disabling the option again after making the changes, as generally you don’t want existing invoices to be altered after they have been issued. You can also delete the invoice with the trash can icon (in the order details page on the ‘PDF Invoice data’ tab), but this also clears the invoice number & date.

    Hope that helps!

    Plugin Contributor kluver

    (@kluver)

    • This reply was modified 5 years, 5 months ago by kluver. Reason: duplicate
    Thread Starter flyangel

    (@flyangel)

    Unfortunately I can not completely eliminate the invoice, because the invoice number and the date are OK and must remain that way.

    To regenerate an old invoice (while keeping the invoice number & date), you can temporarily enable the option ‘Always use most current settings’

    I tried again after enabling this function (Always use most current settings), but the invoice is generated as before. I do not understand why it does not work.

    Can you try to recreate this situation? Change the tax name and reprint the invoice? Maybe I’m wrong.

    Plugin Contributor Ewout

    (@pomegranate)

    Ah, my apologies, I misinterpreted the question, I think I know what you mean now. By ‘tax name’, you are referring to the name of the tax rate in the totals, correct? Unfortunately this is something that is stored in the WooCommerce order and cannot be updated easily (or without risk).

    The following method is at your own risk and I strongly recommend testing this on a staging copy of the site first to see if it yields the desired results, as this may lead to irreversable changes in the order…

    Step 1: Enable editing of paid orders in woocommerce
    Paid orders are not editable by default, so you have to enable this with a filter:

    
    add_filter( 'wc_order_is_editable', '__return_true' );
    

    If you haven’t worked with code snippets (actions/filters) or functions.php before, read this guide: How to use filters

    Step 2: Remove the tax column(s)
    Open the affected order, it should be editable now. Hover the column in the order items list where it shows the tax name. Click the ‘x’ to remove it.

    Step 3: Add the new rate
    After removing the tax rate, let WooCommerce automatically add the new rate again by pressing the blue ‘Recalculate’ button.

    Good luck!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Regenerate an old invoice after changing the name of the tax.’ is closed to new replies.