Item total for WooCommerce

WooCommerce by default does not come with an option to display the product total inclusive of tax in the order details page. Seeing as that’s also one of the popular requests in the WooCommerce.com ideas board, I’ve gone ahead and created a small plugin that would let users see the Product total right next to the product name:

Order details page.

Note that in the screenshot above, Item total = ( Cost * Qty ) + Tax total. This is the actual product total paid by the customer, and Cost = Price of the product minus Discounts (if any)

Usage:

  • Install the plugin and activate it. No further configuration is required.

My Learnings:

How did you add the details there?

I made use of two action hooks: woocommerce_admin_order_item_headers to add the table Header, and woocommerce_admin_order_item_values to add the tax value.

What did you learn?

  1. wc_get_order() can be used to grab all the order details as long as you have the order ID
  2. wc_price() Formats a passed price with the correct number of decimals and currency symbol.

Feel free to share your thoughts in the comment below. If you find an issue/bug though, please report it as an issue in the repo.

2 Comments on “ Item total for WooCommerce ”

  • Hi!
    This is great! Would you like to release it as a plugin in the wordpress.org plugin repo? It would make it easier to install on various sites.
    Thanks!

    • Hello Ben,

      Would you like to release it as a plugin in the wordpress.org plugin repo? It would make it easier to install on various sites.

      I don’t have immediate plans to release this in the .org repo. Maybe sometime in the future.

      Thank you 🙂

Leave a Reply

Your email address will not be published.