I am using a custom packing slip / invoice template which will be sent to customers who order through Amazon. The default Amazon shipping method that comes through is: 'Std UK Dom_1'
I would like to change that so it states 'Royal Mail' in its place. I've gone in to the php of the template to try and mess around to get it to work myself but it is not quite working how I would like. I was thinking for some kind of IF statement to say something like if the label equals 'Std UK Dom_1' then display 'Royal Mail' but I am really not sure if that is possible or what format it would be in at all.
The data that is showing the 'Std UK Dom_1' is <th class="description"><?php echo $total['label']; ?>
I'm new to this kind of thing so anything that anyone could help with would be great.
<td class="no-borders" colspan="3">
<table class="totals">
<tfoot>
<?php foreach ( $this->get_woocommerce_totals() as $key => $total ) : ?>
<tr class="<?php echo $key; ?>">
<th class="description"><?php echo $total['label']; ?></th>
<td class="price"><span class="totals-price"><?php echo $total['value']; ?></span></td>
</tr>
<?php endforeach; ?>
</tfoot>
</table>
</td>