Viewing 6 replies - 1 through 6 (of 6 total)
  • Caleb Burks

    (@icaleb)

    Automattic Happiness Engineer

    Depending on your tax settings at WooCommerce > Settings > Tax, you can have your own tax row like this: https://cld.wthms.co/12ouP/3LDY3uQs

    First, set up a tax rate with a tax name like this: https://cld.wthms.co/18yUB/3mNM3PvN. Then have you taxes display in an itemized format: https://cld.wthms.co/1ifCL/xga58aJF

    Thread Starter Jason Wong

    (@eljkmw)

    Yes. I too have thought of just naming the tax_class as “GST (6%)” as you’ve mentioned. However, I was hoping to find a way to retrieve the tax_rate, insert it between the brackets and after the tax_class name. Perhaps I’m used to Magento, which does that.

    Anyway, within the file “WooCommerce/ includes/class-wc-tax.php”, I found this function “get_rate_percent” that returns a given rates percentage. I’m unsure if I can use it to concatenate the strings in function. It’s driving me crazy … (><)”

    Thomas Shellberg

    (@shellbeezy)

    Automattic Happiness Engineer

    Simply writing the tax percentage amount in the tax name itself seems like the easiest approach here, unless you have a ton of tax rates to input.

    The $tax->label property determines the output throughout the site, but I don’t see a filter for it. To change the output, it looks like you’d need to override the relevant template files(review-order.php for instance).

    Thread Starter Jason Wong

    (@eljkmw)

    What will you suggest is the most appropriate approach, Thomas?

    Plugin Contributor Mike Jolley (a11n)

    (@mikejolley)

    Why can’t the percent just be part of the label?

    Thread Starter Jason Wong

    (@eljkmw)

    Good question, Mike. Thank you.

    As I mentioned earlier on in this thread, I used Magento before (and still am) which automatically merges both the tax_class and tax_rate together. Since WooCommerce can’t do that, it looks like I’ve no other choice but to accommodate your suggestion.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘How to add tax-percentage in brackets after Tax/GST ?’ is closed to new replies.