DEV Community

Dupuis Sébastien
Dupuis Sébastien

Posted on

1 1

add different subtotals to the tax on my invoice woocommerce

I am starting on the development of php and wordpress and I am looking to modify the subtotal on my invoice to make two that would correspond to the subtotal of the two taxes I own on my site.

Like this:

Subtotal 5.5%: €44.50€
Sub-total 20%: €33.58€
Tax 5,5%: 2,45€
Tax 20%: 6,72€

From what I understood, it would consist in adding all the products on the invoice with a tav at 20% to do the same for those at 5% to get two lines out?

I looked at this document a little bit: https://github.com/woocommerce/woocommerce/blob/master/includes/abstracts/abstract-wc-order.php#L467

But I'm not sure how to do it.

Can you enlighten me?? I've done a lot of research, but I can't find the solution.

Sorry it's my first post here if I'm doing it wrong give me a feedback !

Top comments (0)

Heroku

Simplify your DevOps and maximize your time.

Since 2007, Heroku has been the go-to platform for developers as it monitors uptime, performance, and infrastructure concerns, allowing you to focus on writing code.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay