• Resolved Cecily

    (@cecilywiggins)


    Hi

    I am looking for assistance to remove the following items from the New Order Admin for the woocommerce 2.5.

    — shipping
    — subtotal
    — payment method

    My previous customizations are coming up with some funky results and bringing in the purchase note.

    <table class="td" cellspacing="0" cellpadding="6" style="width: 100%; font-family: 'Helvetica Neue', Helvetica, Roboto, Arial, sans-serif;" border="1">
    	<thead>
    		<tr>
    			<th class="td" scope="col" style="text-align:left;"><?php _e( 'Product', 'woocommerce' ); ?></th>
    			<th class="td" scope="col" style="text-align:left;"><?php _e( 'Quantity', 'woocommerce' ); ?></th>
    			<th class="td" scope="col" style="text-align:left;"><?php _e( 'Price', 'woocommerce' ); ?></th>
    		</tr>
    	</thead>
    	<tbody>
    		<?php echo $order->email_order_items_table( false, true ); ?>
    	</tbody>
    	<tfoot>
        <?php
    if ( $totals = $order->get_order_item_totals() ) {
    $i = 0;
    foreach ( $totals as $total ) {
    $i++;
    
    //start ignore total labels pt1
    if (($total['label'] !== 'Payment Method:') && ($total['label'] !== 'Subtotal:')) :
    //end ignore total labels pt1
    ?>
    <tr>
        <th scope="row" colspan="2" style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['label']; ?></th>
        <td style="text-align:left; border: 1px solid #eee; <?php if ( $i == 1 ) echo 'border-top-width: 4px;'; ?>"><?php echo $total['value']; ?></td>
    </tr>
    
    <?php
    //start ignore total labels pt2
    endif;
    //end ignore total labels pt2
    }
    }
    ?>
    </tfoot>
    </table>

    Administrators typically don’t need this information anyway…and have to scroll to get the client shipping info when

    https://www.ads-software.com/plugins/woocommerce/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor Mike Jolley

    (@mikejolley)

    The call to ’email_order_items_table’ contains the purchase note (I did tell you we’re hiding that from admin in 2.5.2 so you may as well wait for that release).

    The shipping and subtotal come from get_order_item_totals.

    After this line:

    if ( $totals = $order->get_order_item_totals() ) {

    You could just unset some items.

    unset($totals['shipping']);

    Then loop over them normally.

    Is it possible to send woocommerce order receipt for individual products?

    If yes then please suggest me how to do this?

    Plugin Contributor Mike Jolley

    (@mikejolley)

    piyush503 please post your own thread instead of posting in unrelated topics ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remove Shipping Cost, Payment Method & Subtotal from New Order Admin Email’ is closed to new replies.