get_items( apply_filters( 'woocommerce_admin_order_item_types', 'line_item' ) );
$discounts = $order->get_items( 'discount' );
$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 = wc_get_product_tax_class_options();
$show_tax_columns = count( $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' );
/* translators: %1$s: tax item name %2$s: tax class name */
$column_tip = sprintf( esc_html__( '%1$s (%2$s)', 'woocommerce' ), $tax_item['name'], $tax_class_name );
?>
|
|
$item ) {
do_action( 'woocommerce_before_order_item_' . $item->get_type() . '_html', $item_id, $item, $order );
include 'html-order-item.php';
do_action( 'woocommerce_order_item_' . $item->get_type() . '_html', $item_id, $item, $order );
}
do_action( 'woocommerce_admin_order_items_after_line_items', $order->get_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->get_id() );
?>
$item ) {
include 'html-order-fee.php';
}
do_action( 'woocommerce_admin_order_items_after_fees', $order->get_id() );
?>
get_refunds();
if ( $refunds ) {
foreach ( $refunds as $refund ) {
include 'html-order-refund.php';
}
do_action( 'woocommerce_admin_order_items_after_refunds', $order->get_id() );
}
?>
get_items( 'coupon' );
if ( $coupons ) :
?>
$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->get_code() ) );
$class = $order->is_editable() ? 'code editable' : 'code';
?>
-
$post_id,
'action' => 'edit',
),
admin_url( 'post.php' )
), $item, $order );
?>
get_code() ); ?>
get_code() ); ?>
is_editable() ) : ?>
get_total_discount() ) : ?>
|
|
get_total_discount(), array( 'currency' => $order->get_currency() ) ); // WPCS: XSS ok. ?>
|
get_id() ); ?>
get_shipping_methods() ) : ?>
|
|
get_total_shipping_refunded();
if ( $refunded > 0 ) {
echo '' . strip_tags( wc_price( $order->get_shipping_total(), array( 'currency' => $order->get_currency() ) ) ) . ' ' . wc_price( $order->get_shipping_total() - $refunded, array( 'currency' => $order->get_currency() ) ) . ''; // WPCS: XSS ok.
} else {
echo wc_price( $order->get_shipping_total(), array( 'currency' => $order->get_currency() ) ); // WPCS: XSS ok.
}
?>
|
get_id() ); ?>
get_tax_totals() as $code => $tax ) : ?>
label ); ?>: |
|
get_total_tax_refunded_by_rate_id( $tax->rate_id );
if ( $refunded > 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_currency() ) ) . ''; // WPCS: XSS ok.
} else {
echo wp_kses_post( $tax->formatted_amount );
}
?>
|
get_id() ); ?>
: |
|
get_formatted_order_total(); // WPCS: XSS ok. ?>
|
get_id() ); ?>
get_total_refunded() ) : ?>
: |
|
-get_total_refunded(), array( 'currency' => $order->get_currency() ) ); // WPCS: XSS ok. ?> |
get_id() ); ?>
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_currency() ) ) . '';
$gateway_name = false !== $payment_gateway ? ( ! empty( $payment_gateway->method_title ) ? $payment_gateway->method_title : $payment_gateway->get_title() ) : __( 'Payment gateway', 'woocommerce' );
if ( false !== $payment_gateway && $payment_gateway->can_refund_order( $order ) ) {
/* translators: refund amount, gateway name */
echo '
';
}
?>