• I have a client who wants to use Woocommerce just for ordering,
    shipping and payments will be added later.
    I have managed to pull the subtotal, shipping and payments from everything – EXCEPT order-details.php – so that subtotal and total still show on the my account, and after checkout.

    I can remove BOTH (by commenting out the below code, or have both showing. But I’m totally lost how to get just ONE of them.

    offending bit of code is:

    <?php
    if ( $totals = $order->get_order_item_totals() ) foreach ( $totals as $total ) :
    	?>
    	<tr>
    	<th scope="row"><?php echo $total['label']; ?></th>
    	<td><?php echo $total['value']; ?></td>
    	</tr>
    	<?php
    		endforeach;
    	?>

    Can anyone help with this? Totally lost as to how to do it.
    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • dg

    (@denizgezgin)

    Hello,

    Have you been able to manage that? This is exactly the issue that I’m having; all the other files are ok, except “order-details.php”.

    I’m trying to get rid of “subtotal” field, instead.

    Thanks,

    Deniz

    Same issue, I want to change some of the static wording on this file and hide the bank info and I can’t seem to find where this is pulling it from
    <?php
    if ( $totals = $order->get_order_item_totals() ) foreach ( $totals as $total ) :
    ?>
    <tr>
    <th scope=”row”><?php echo $total[‘label’]; ?></th>
    <td><?php echo $total[‘value’]; ?></td>
    </tr>
    <?php
    endforeach;
    ?>

    Thread Starter NeenNZ

    (@neennz)

    Hi guys,
    It’s been a while and I *did* get rid of it (kind of) – it was a pretty ugly solution from memory.

    I believe what I did in the end was make the row the subtotal was in 0 px high or something similar.

    I will see if I can dig up the code for it and double check.

    I know it had me tearing my hair out – it should be so simple! So obvious! It so isn’t! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Removing total from order-details.php in Woocommerce’ is closed to new replies.