WordPress Development Asked by Shaun Hearnden on October 11, 2020
Hi I would like to order the WooCommerce fees by name in both the order confirmation page and the emails that get sent out by WooCommerce.
I have used the below code for the cart/checkout page, but it does not transfer through to the other pages.
functions.php
function wc_get_sorted_fees(){
$fees = WC()->cart->get_fees();
ksort($fees);
return $fees;
}
and in review-order.php
<?php foreach ( wc_get_sorted_fees() as $fee ) : ?>
Thank you for your help! 😀
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP