get_items( apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) );
$line_items_fee = $order->get_items( 'fee' );
$line_items_shipping = $order->get_items( 'shipping' );
if ( wc_tax_enabled() ) {
$order_taxes = $order->get_taxes();
$tax_classes = WC_Tax::get_tax_classes();
$classes_options = array();
$classes_options[''] = __( 'Standard', 'woocommerce' );
if ( ! empty( $tax_classes ) ) {
foreach ( $tax_classes as $class ) {
$classes_options[ sanitize_title( $class ) ] = $class;
}
}
// Older orders won't have line taxes so we need to handle them differently :(
$tax_data = '';
if ( $line_items ) {
$check_item = current( $line_items );
$tax_data = maybe_unserialize( isset( $check_item['line_tax_data'] ) ? $check_item['line_tax_data'] : '' );
} elseif ( $line_items_shipping ) {
$check_item = current( $line_items_shipping );
$tax_data = maybe_unserialize( isset( $check_item['taxes'] ) ? $check_item['taxes'] : '' );
} elseif ( $line_items_fee ) {
$check_item = current( $line_items_fee );
$tax_data = maybe_unserialize( isset( $check_item['line_tax_data'] ) ? $check_item['line_tax_data'] : '' );
}
$legacy_order = ! empty( $order_taxes ) && empty( $tax_data ) && ! is_array( $tax_data );
$show_tax_columns = ! $legacy_order || sizeof( $order_taxes ) === 1;
}
?>
|
|
|
|
$tax_item ) :
$tax_class = wc_get_tax_class_by_tax_id( $tax_item['rate_id'] );
$tax_class_name = isset( $classes_options[ $tax_class ] ) ? $classes_options[ $tax_class ] : __( 'Tax', 'woocommerce' );
$column_label = ! empty( $tax_item['label'] ) ? $tax_item['label'] : __( 'Tax', 'woocommerce' );
$column_tip = $tax_item['name'] . ' (' . $tax_class_name . ')';
?>
|
|
$item ) {
$_product = $order->get_product_from_item( $item );
$item_meta = $order->get_item_meta( $item_id );
do_action( 'woocommerce_before_order_item_' . $item['type'] . '_html', $item_id, $item, $order );
include( 'html-order-item.php' );
do_action( 'woocommerce_order_item_' . $item['type'] . '_html', $item_id, $item, $order );
}
do_action( 'woocommerce_admin_order_items_after_line_items', $order->id );
?>
shipping() ? WC()->shipping->load_shipping_methods() : array();
foreach ( $line_items_shipping as $item_id => $item ) {
include( 'html-order-shipping.php' );
}
do_action( 'woocommerce_admin_order_items_after_shipping', $order->id );
?>
$item ) {
include( 'html-order-fee.php' );
}
do_action( 'woocommerce_admin_order_items_after_fees', $order->id );
?>
get_refunds() ) {
foreach ( $refunds as $refund ) {
include( 'html-order-refund.php' );
}
do_action( 'woocommerce_admin_order_items_after_refunds', $order->id );
}
?>
get_items( array( 'coupon' ) );
if ( $coupons ) {
?>
' . __( 'Coupon(s) Used', 'woocommerce' ) . '';
foreach ( $coupons as $item_id => $item ) {
$post_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_title = %s AND post_type = 'shop_coupon' AND post_status = 'publish' LIMIT 1;", $item['name'] ) );
$link = $post_id ? add_query_arg( array( 'post' => $post_id, 'action' => 'edit' ), admin_url( 'post.php' ) ) : add_query_arg( array( 's' => $item['name'], 'post_status' => 'all', 'post_type' => 'shop_coupon' ), admin_url( 'edit.php' ) );
echo '- ' . esc_html( $item['name'] ). '
';
}
?>
: |
|
get_total_discount(), array( 'currency' => $order->get_order_currency() ) ); ?>
|
id ); ?>
: |
|
get_total_shipping_refunded() ) > 0 ) {
echo '' . strip_tags( wc_price( $order->get_total_shipping(), array( 'currency' => $order->get_order_currency() ) ) ) . ' ' . wc_price( $order->get_total_shipping() - $refunded, array( 'currency' => $order->get_order_currency() ) ) . '';
} else {
echo wc_price( $order->get_total_shipping(), array( 'currency' => $order->get_order_currency() ) );
}
?> |
id ); ?>
get_tax_totals() as $code => $tax ) : ?>
label; ?>: |
|
get_total_tax_refunded_by_rate_id( $tax->rate_id ) ) > 0 ) {
echo '' . strip_tags( $tax->formatted_amount ) . ' ' . wc_price( WC_Tax::round( $tax->amount, wc_get_price_decimals() ) - WC_Tax::round( $refunded, wc_get_price_decimals() ), array( 'currency' => $order->get_order_currency() ) ) . '';
} else {
echo $tax->formatted_amount;
}
?> |
id ); ?>
: |
is_editable() ) : ?>
|
get_formatted_order_total(); ?>
|
id ); ?>
: |
|
-get_total_refunded(), array( 'currency' => $order->get_order_currency() ) ); ?> |
id ); ?>
is_editable() ) : ?>
is_editable() ) : ?>
get_total() - $order->get_total_refunded() || 0 < absint( $order->get_item_count() - $order->get_item_count_refunded() ) ) : ?>
is_editable() ) : ?>
get_total() - $order->get_total_refunded() || 0 < absint( $order->get_item_count() - $order->get_item_count_refunded() ) ) : ?>
' . wc_price( 0, array( 'currency' => $order->get_order_currency() ) ) . '';
$gateway_supports_refunds = false !== $payment_gateway && $payment_gateway->supports( 'refunds' );
$gateway_name = false !== $payment_gateway ? ( ! empty( $payment_gateway->method_title ) ? $payment_gateway->method_title : $payment_gateway->get_title() ) : __( 'Payment Gateway', 'woocommerce' );
?>