update order details summary with items subtotal and start to add fees

This commit is contained in:
David Levin 2019-12-18 20:51:45 -08:00
parent f7bc61f818
commit c6cd7331f9
1 changed files with 19 additions and 1 deletions

View File

@ -143,15 +143,33 @@ if ( wc_tax_enabled() ) {
</div>
<?php endif; ?>
<table class="wc-order-totals">
<?php?>
<tr>
<td class="label"><?php esc_html_e( 'Item(s) Subtotal:', 'woocommerce' ); ?></td>
<td width="1%"></td>
<td class="total">
<?php echo wc_price( $order->get_subtotal(), array( 'currency' => $order->get_currency() ) ); // WPCS: XSS ok. ?>
</td>
</tr>
<?php?>
<?php if ( 0 < $order->get_total_discount() ) : ?>
<tr>
<td class="label"><?php esc_html_e( 'Discount:', 'woocommerce' ); ?></td>
<td class="label"><?php esc_html_e( 'Coupon(s):', 'woocommerce' ); ?></td>
<td width="1%"></td>
<td class="total">
<?php echo wc_price( $order->get_total_discount(), array( 'currency' => $order->get_currency() ) ); // WPCS: XSS ok. ?>
</td>
</tr>
<?php endif; ?>
<?php if ( 0 < $order->get_fees() ) : ?>
<tr>
<td class="label"><?php esc_html_e( 'Fee(s):', 'woocommerce' ); ?></td>
<td width="1%"></td>
<td class="total">
<?php echo wc_price( $order->get_fees(), array( 'currency' => $order->get_currency() ) ); // WPCS: XSS ok. ?>
</td>
</tr>
<?php endif; ?>
<?php do_action( 'woocommerce_admin_order_totals_after_discount', $order->get_id() ); ?>