id ) . '&action =edit' ) : '';
$thumbnail = $_product ? apply_filters( 'woocommerce_admin_order_item_thumbnail', $_product->get_image( 'shop_thumbnail', array( 'title' => '' ), false ), $item_id, $item ) : '';
$tooltip = _wc_get_order_item_tooltip_content( $item, $_product );
$tax_data = empty( $legacy_order ) && wc_tax_enabled() ? maybe_unserialize( isset( $item['line_tax_data'] ) ? $item['line_tax_data'] : '' ) : false;
$item_total = ( isset( $item['line_total'] ) ) ? esc_attr( wc_format_localized_price( $item['line_total'] ) ) : '';
$item_subtotal = ( isset( $item['line_subtotal'] ) ) ? esc_attr( wc_format_localized_price( $item['line_subtotal'] ) ) : '';
?>
' : ' ';
echo wp_kses_post( $thumbnail );
echo $product_link ? '' : ' ';
?>
|
' . esc_html( $item['name'] ) . '' : ' ' . esc_html( $item['name'] ) . ' ';
echo $_product && $_product->get_sku() ? '' . __( 'SKU:', 'woocommerce' ) . ' ' . esc_html( $_product->get_sku() ) . ' ' : ''; ?>
|
get_item_total( $item, false, true ), array( 'currency' => $order->get_order_currency() ) );
if ( isset( $item['line_subtotal'] ) && $item['line_subtotal'] != $item['line_total'] ) {
echo '' . __( 'Pre-discount:', 'woocommerce' ) . ' ' . wc_price( $order->get_item_subtotal( $item, false, true ), array( 'currency' => $order->get_order_currency() ) ) . '';
}
}
?>
|
× ' . ( isset( $item['qty'] ) ? esc_html( $item['qty'] ) : '1' );
if ( $refunded_qty = $order->get_qty_refunded_for_item( $item_id ) ) {
echo '' . $refunded_qty . '';
}
?>
|
$order->get_order_currency() ) );
}
if ( $refunded = $order->get_total_refunded_for_item( $item_id ) ) {
echo ' -' . wc_price( $refunded, array( 'currency' => $order->get_order_currency() ) ) . '';
}
if ( isset( $item['line_subtotal'] ) && $item['line_subtotal'] !== $item['line_total'] ) {
echo ' ' . __( 'Pre-discount:', 'woocommerce' ) . ' '. wc_price( $order->get_line_subtotal( $item, false, true ), array( 'currency' => $order->get_order_currency() ) ) . '';
}
// Output a row per tax total
if ( ! empty( $tax_data ) ) {
echo ' ';
foreach ( $order_taxes as $tax_item ) {
$tax_item_id = $tax_item['rate_id'];
$tax_item_total = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : '';
$tax_item_subtotal = isset( $tax_data['subtotal'][ $tax_item_id ] ) ? $tax_data['subtotal'][ $tax_item_id ] : '';
$tax_class = wc_get_tax_class_by_tax_id( $tax_item_id );
$tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' );
$tax_label = ! empty( $tax_item['label'] ) ? $tax_item['label'] : __( 'Tax', 'woocommerce' );
if ( $tax_item_total ) {
echo '- ';
echo esc_html( $tax_label ) . ': ';
if ( isset( $tax_item_subtotal ) && $tax_item_subtotal != $tax_item_total ) {
echo '
' . wc_price( wc_round_tax_total( $tax_item_subtotal ), array( 'currency' => $order->get_order_currency() ) ) . ' ';
}
echo wc_price( wc_round_tax_total( $tax_item_total ), array( 'currency' => $order->get_order_currency() ) );
echo ' ';
}
}
echo ' ';
}
?>
';
foreach ( $order_taxes as $tax_item ) {
$tax_item_id = $tax_item['rate_id'];
$tax_item_total = isset( $tax_data['total'][ $tax_item_id ] ) ? $tax_data['total'][ $tax_item_id ] : '';
$tax_item_subtotal = isset( $tax_data['subtotal'][ $tax_item_id ] ) ? $tax_data['subtotal'][ $tax_item_id ] : '';
$tax_class = wc_get_tax_class_by_tax_id( $tax_item_id );
$tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' );
$tax_label = ! empty( $tax_item['label'] ) ? $tax_item['label'] : __( 'Tax', 'woocommerce' );
$item_subtotal_tax = esc_attr( wc_format_localized_price( $tax_item_subtotal ) );
$item_total_tax = esc_attr( wc_format_localized_price( $tax_item_total ) );
echo ' ';
echo '';
?>
';
}
echo '';
}
?>
|
|