WC_Abstract_Order::add_order_item_totals_subtotal_row( array $total_rows, string $tax_display )
Add total row for subtotal.
Description Description
Parameters Parameters
- $total_rows
-
(Required) Reference to total rows array.
- $tax_display
-
(Required) Excl or incl tax display mode.
Source Source
File: includes/abstracts/abstract-wc-order.php
protected function add_order_item_totals_subtotal_row( &$total_rows, $tax_display ) { $subtotal = $this->get_subtotal_to_display( false, $tax_display ); if ( $subtotal ) { $total_rows['cart_subtotal'] = array( 'label' => __( 'Subtotal:', 'woocommerce' ), 'value' => $subtotal, ); } }