I am customizing the order email template in WooCommerce and need to change the title of "Shipping" to "Delivery," as well as change "Shipping address" to "Delivery address". I tried a plugin, "Say What" that would change the text but it did not work. There is a loop that handles all of this information.
This is the code on line 52 in the "email-order-details.php" page.
if ( $totals = $order->get_order_item_totals() ) {
$i = 0;
foreach ( $totals as $total ) {
$i++;
if($total['label'] === "Shipping"){
//make second-last above total somehow
}
else{
?><tr>
<th class="td" scope="row" colspan="3" style="text-align:<?php echo $text_align; ?>; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>"><?php echo $total['label']; ?></th>
<td class="td" style="text-align:left; <?php echo ( 1 === $i ) ? 'border-top-width: 4px;' : ''; ?>" colspan="1"><?php echo $total['value']; ?></td>
</tr><?php
}
}
}
I assume this is a filter hook, but I am not sure how to use it.
woocommerce_get_order_item_totals