WC_Abstract_Order::add_order_item_totals_shipping_row()
Add total row for shipping.
Метод класса: WC_Abstract_Order{}
Хуков нет.
Возвращает
null
. Ничего (null).
Использование
// protected - в коде основоного (родительского) или дочернего класса $result = $this->add_order_item_totals_shipping_row( $total_rows, $tax_display );
- $total_rows(массив) (обязательный) (передается по ссылке — &)
- Reference to total rows array.
- $tax_display(строка) (обязательный)
- Excl or incl tax display mode.
Код WC_Abstract_Order::add_order_item_totals_shipping_row() WC Abstract Order::add order item totals shipping row WC 9.7.1
protected function add_order_item_totals_shipping_row( &$total_rows, $tax_display ) { if ( $this->get_shipping_method() ) { $total_rows['shipping'] = array( 'type' => 'shipping', 'label' => __( 'Shipping:', 'woocommerce' ), 'value' => $this->get_shipping_to_display( $tax_display ), 'meta' => $this->get_shipping_method(), ); } }