• Resolved henrihappy

    (@henrihappy)


    Hi,

    How do I get ride of the statement between brackets (excl. vat) next to the price on the invoice. I asked WC support and it is not one of the settings they have and pointed out to the invoice program I use. What do I need to do to lose this next to the prices on the invoice.

    thank you.

    Henri

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Darren Peyou

    (@dpeyou)

    Hi @henrihappy,

    Do you think you could you send us a screenshot of your invoice?
    You can use this service to host the image:
    https://imgbb.com/

    I ask because at first glance it sounds like you might be using the Premium Extension of the plugin..? If yes, please email us at [email protected], as we cannot provide support for paid plugins here.

    Plugin Contributor Darren Peyou

    (@dpeyou)

    Hi @henrihappy,

    I’m really sorry about my confusion.

    The setting that controls this lives in WooCommerce > Settings > Tax, where you most likely have “Yes, enter prices inclusive of tax” selected & “Display prices during cart and checkout” set to “Excluding tax”.

    To give you more information, WooCommerce support may not have been entirely accurate when they said it was a PDF invoice issue because we actually get that information directly from WooCommerce itself, formatted like that.

    You could remove the text with the following code snippet, though please note that this will remove the suffix from other parts where WooCommerce displays this as well (on the my account order page and in the emails). With that said, here’s that sweet snippet:

    add_filter( 'woocommerce_order_subtotal_to_display', function( $subtotal, $compound, $order ){
    	return preg_replace('/<small[\s\S]+?small>/', '', $subtotal);
    }, 10, 3 );

    If you haven’t used hooks before, read this guide: https://docs.wpovernight.com/general/how-to-use-filters/

    • This reply was modified 3 years, 9 months ago by Darren Peyou.
    Thread Starter henrihappy

    (@henrihappy)

    Hi,

    Thank you for taking the time to solve this, I do think I have the setting set to exclusive vat on both settings, that didn’t help.

    I added that sweet snippet and this is the result. Please note that there are certain countries I do have to charge VAT, so I do need VAT for the countries I set.

    Don’t Panic

    The code snippet you are trying to save produced a fatal error on line 1:
    syntax error, unexpected ‘&’

    The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.

    Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.

    Thread Starter henrihappy

    (@henrihappy)

    I copied it from here and that works fine, apparently in the email it added & Lets wait for the first order to come in what happens

    thanks again!

    Thread Starter henrihappy

    (@henrihappy)

    Hi,

    Got in an order and nothing changed. Thank you, Henri

    Thread Starter henrihappy

    (@henrihappy)

    I use a plugin WP-lister for ebay listings. They are looking into it now as well and asked for the invoice plugin I use, so they can look in the code there if something conflicts.

    thank you.

    Henri

    Plugin Contributor Ewout

    (@pomegranate)

    Note that the above snippet removes (or should remove!) the “(ex VAT)” from the subtotal, but not from the line item prices, can you double check this?

    Thread Starter henrihappy

    (@henrihappy)

    https://ibb.co/7zZM2fj

    latest invoice.

    Plugin Contributor Ewout

    (@pomegranate)

    Thanks for providing that Henri, this confirms that the snippet works, it has removed the “(ex VAT)” string from the subtotal.

    If you need more control over the prices I recommend getting the Premium Templates extension, which allows you to configure the price display including/excluding tax to your precise requirements.

    Thread Starter henrihappy

    (@henrihappy)

    ewout,

    I looked back to all the old invoices, it was never there! The only concern is the exc. vat next to the prices.

    Can the snippet be converted to get ride of it there.

    Thank you!

    Henri

    Plugin Contributor Ewout

    (@pomegranate)

    Hello Henri,
    Here are two screenshots of the PDFs you sent us, showing the (ex VAT) text in the subtotal first, then removed after applying the code snippet:
    before:

    after:

    Is it possible you forgot to disable the code snippet when looking at the old orders? Those would automatically be updated with this snippet too.

    Thread Starter henrihappy

    (@henrihappy)

    ok seen it, you are absolutely right! My bad.

    Henri

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘vat line’ is closed to new replies.