• Resolved tmidd27

    (@tmidd27)


    My employer wishes to add a column to all email order summaries showing the tax breakdown of purchases. As we sell products that are tax exempt and some that aren’t.

    So I wish for the columns to be
    Product / Quantity / Price / Tax

    Where the tax column is the amount of tax applicable to that product.

    I am aware that there are multiple plugins that would do this, however from what I can gather they all require a subscription payment and come with many other functions. My employer does not want to pay a fee for such a small request and does not need the other functions.

    Can anyone explain an easy way in which I can do this? I already have a few fixes running using WPCode Snippets, but this one does not seem to work using that Plugin, is that correct? Or can anyone advise on a code snippet that would do this for me?

    Any help would be greatly appreciated. Thanks ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • Hey there, @tmidd27! Thanks for contacting us.

    While we can’t provide support for code customization as per our support policy, we do our best to offer advice and direct you to appropriate resources.

    You can find some general tips on how to customize email templates here.

    For more specific coding, you can visit the WooCommerce Facebook group or the #developers channel of the WooCommerce Community Slack. We’re lucky to have a great community of open-source developers for WooCommerce, and many of our developers hang out there too.

    I’m going to leave it open for a bit to see if anyone is able to chime in and help you out further.

    Please let us know if there’s anything else we can do to help or if you have any questions.

    Have a wonderful day!

    See this thread for the method to do that:

    https://www.ads-software.com/support/topic/add-an-itemised-tax-column-to-email/

    The downside identified in that thread is that the edited templates will be overwritten when WooCommerce is updated, which happens regularly. To avoid this issue, the edited templated should be stored in:

    wp-content/themes/my-child-theme-name/woocommerce/emails

    The email creation code will look for any template overrides in the child-theme folder before using the default templates.

    If code snippets is not working for any particular snippet, its possible that the snippet needs to run earlier in the execution sequence. To do so, make a child theme and put the snippet in functions.php for the child theme. In fact, all your code snippets can go in there.

    Thread Starter tmidd27

    (@tmidd27)

    Thanks Lorro. I found that thread and tried the code, however it doesn’t work and I am unsure if I am entering it correctly.

    Is anyone able to confirm what the code should be so I can check if I am entering it correctly?

    Its not just the code. Its making a child theme and putting the edited templates in the right place. Some PHP skills will be needed.

    If you need some help, consider posting a job:
    https://jobs.wordpress.net/

    We haven’t heard back from you in a while, so I’m going to mark this as resolved – we’ll be here if and/or when you are ready to continue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add a tax column to Email Order Details’ is closed to new replies.