Support » Plugin: WooCommerce » Tax suffix only if tax is not equal to zero

  • Resolved edludlow

    (@edludlow)


    All products I sell on my shop include VAT (UK sales tax), but some are standard rate (20%) and some are zero rated (0%). Confusing and annoying, but for accounting purposes they ARE both VATable.

    I have my prices set up to show including taxes wiht the suffix “(incl. VAT)” but ideally I only want to show that suffix IF VAT has actually altered the price. So let’s say product x £10 plus standard rate VAT (total £12) and product y is £10 but zero rated, I’d like them to display as:

    product x £10
    product y £12 (incl. VAT)

    Anyone know of a way of doing this? Happy to use a plugin if it will achieve what I want, as I don’t think there’s a way of doing it “out of the box”?

    Many thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Con a11n

    (@conschneider)

    Automattic Happiness Engineer

    Hi there,

    So let’s say product x £10 plus standard rate VAT (total £12) and product y is £10 but zero rated, I’d like them to display as:
    product x £10
    product y £12 (incl. VAT)

    I recommend writing a custom function for this in PHP. Here is the pseudocode:

    * Get tax value of product.

    For example:

    $product->get_tax_status();
    $product->get_tax_class();

    * Check if tax value is higher than zero.
    * If lower than zero >> hide label.

    Kind regards,

    Thread Starter edludlow

    (@edludlow)

    Thanks. I think that may we’ll be the route I need to go down. A job for tomorrow!

    Appreciate the response.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Tax suffix only if tax is not equal to zero’ is closed to new replies.