Removing total from order-details.php in Woocommerce (1 post)

  1. NeenNZ
    Posted 9 months ago #

    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:

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

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


You must log in to post.

About this Topic