WC_Abstract_Order::add_order_item_totals_total_row()
Add total row for grand total.
Method of the class: WC_Abstract_Order{}
No Hooks.
Return
null
. Nothing (null).
Usage
// protected - for code of main (parent) or child class $result = $this->add_order_item_totals_total_row( $total_rows, $tax_display );
- $total_rows(array) (required) (passed by reference — &)
- Reference to total rows array.
- $tax_display(string) (required)
- Excl or incl tax display mode.
WC_Abstract_Order::add_order_item_totals_total_row() WC Abstract Order::add order item totals total row code WC 8.7.0
protected function add_order_item_totals_total_row( &$total_rows, $tax_display ) { $total_rows['order_total'] = array( 'label' => __( 'Total:', 'woocommerce' ), 'value' => $this->get_formatted_order_total( $tax_display ), ); }