WC_Email_Customer_POS_Refunded_Order::order_item_totals
Add additional details to the order item totals table.
Method of the class: WC_Email_Customer_POS_Refunded_Order{}
No Hooks.
Returns
Array. Modified array of total rows.
Usage
$WC_Email_Customer_POS_Refunded_Order = new WC_Email_Customer_POS_Refunded_Order(); $WC_Email_Customer_POS_Refunded_Order->order_item_totals( $total_rows, $order, $tax_display );
- $total_rows(array) (required)
- Array of total rows.
- $order(WC_Order) (required)
- Order object.
- $tax_display(string) (required)
- Tax display.
WC_Email_Customer_POS_Refunded_Order::order_item_totals() WC Email Customer POS Refunded Order::order item totals code WC 10.8.1
public function order_item_totals( $total_rows, $order, $tax_display ) {
$auth_code = $order->get_meta( '_charge_id', true );
if ( ! empty( $auth_code ) ) {
$total_rows['payment_auth_code'] = array(
'type' => 'payment_auth_code',
'label' => __( 'Auth code:', 'woocommerce' ),
'value' => $auth_code,
);
}
if ( $order->get_date_paid() !== null ) {
$total_rows['date_paid'] = array(
'type' => 'date_paid',
'label' => __( 'Time of payment:', 'woocommerce' ),
'value' => wc_format_datetime( $order->get_date_paid(), get_option( 'date_format' ) . ' ' . get_option( 'time_format' ) ),
);
}
return $total_rows;
}