Skip to content
Advertisement

Sort fees by name on WooCommerce Orders and email notifications

I need to sort fees by name rather than the default by price in WooCommerce orders.

Using Reordering multiple fees differently in Woocommerce cart and checkout pages answer code, I have managed to sort fees by name in cart and checkout pages. But it doesn’t work for the order confirmation and emails that get sent out.

Thank you for your help.

Advertisement

Answer

Updated

To sort fees by name on customer orders and email notifications, you will use the following:

JavaScript

Code goes in functions.php file of your active child theme (or active theme). Tested and works.

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement