get_product(); $product_link = $product ? admin_url( 'post.php?post=' . $item->get_product_id() . '&action=edit' ) : ''; $thumbnail = $product ? apply_filters( 'woocommerce_admin_order_item_thumbnail', $product->get_image( 'thumbnail', array( 'title' => '' ), false ), $item_id, $item ) : ''; $row_class = apply_filters( 'woocommerce_admin_html_order_item_class', ! empty( $class ) ? $class : '', $item, $order ); $wc_price_arg = array( 'currency' => $order->get_currency() ); $is_visible = $product && $product->is_visible(); /** * Filter the order item name. * * @since 9.9.0 * @param string $item_name The order item's name. * @param WC_Order_Item $item The order item object. * @param bool $is_visible Item's product visibility in the catalog. */ $item_name = apply_filters( 'woocommerce_order_item_name', $item->get_name(), $item, $is_visible ); ?> ' . wp_kses_post( $thumbnail ) . ''; ?> ' . wp_kses_post( $item_name ) . '' : '
' . wp_kses_post( $item_name ) . '
'; if ( $product && $product->get_sku() ) { echo '
' . esc_html__( 'SKU:', 'woocommerce' ) . ' ' . esc_html( $product->get_sku() ) . '
'; } if ( $item->get_variation_id() ) { echo '
' . esc_html__( 'Variation ID:', 'woocommerce' ) . ' '; if ( 'product_variation' === get_post_type( $item->get_variation_id() ) ) { echo esc_html( $item->get_variation_id() ); } else { /* translators: %s: variation id */ printf( esc_html__( '%s (No longer exists)', 'woocommerce' ), esc_html( $item->get_variation_id() ) ); } echo '
'; } ?> get( CostOfGoodsSoldController::class )->feature_is_enabled() ) : ?> get_cogs_value_per_unit_tooltip_text(); ?>
> get_cogs_value_html() ); $refunded_cost = $order->get_cogs_refunded_for_item( $item_id ); echo wp_kses_post( $item->get_cogs_refund_value_html( $refunded_cost, $wc_price_arg, $order ) ); ?>
get_item_subtotal( $item, false, true ), $wc_price_arg ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
× ' . esc_html( $item->get_quantity() ); $refunded_qty = -1 * $order->get_qty_refunded_for_item( $item_id ); if ( $refunded_qty ) { echo '' . esc_html( $refunded_qty * -1 ) . ''; } ?>
get_purchase_quantity_step() : 1; /** * Filter to change the product quantity stepping in the order editor of the admin area. * * @since 5.8.0 * @param string $step The current step amount to be used in the quantity editor. * @param WC_Product $product The product that is being edited. * @param string $context The context in which the quantity editor is shown, 'edit' or 'refund'. */ $step_edit = apply_filters( 'woocommerce_quantity_input_step_admin', $step, $product, 'edit' ); $step_refund = apply_filters( 'woocommerce_quantity_input_step_admin', $step, $product, 'refund' ); /** * Filter to change the product quantity minimum in the order editor of the admin area. * * @since 5.8.0 * @param string $step The current minimum amount to be used in the quantity editor. * @param WC_Product $product The product that is being edited. * @param string $context The context in which the quantity editor is shown, 'edit' or 'refund'. */ $min_edit = apply_filters( 'woocommerce_quantity_input_min_admin', '0', $product, 'edit' ); $min_refund = apply_filters( 'woocommerce_quantity_input_min_admin', '0', $product, 'refund' ); ?>
get_total(), $wc_price_arg ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped if ( $item->get_subtotal() !== $item->get_total() ) { /* translators: %s: discount amount */ echo '' . sprintf( esc_html__( '%s discount', 'woocommerce' ), wc_price( wc_format_decimal( $item->get_subtotal() - $item->get_total(), '' ), $wc_price_arg ) ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } $refunded = -1 * $order->get_total_refunded_for_item( $item_id ); if ( $refunded ) { echo '' . wc_price( $refunded, $wc_price_arg ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } ?>
get_taxes() : false; if ( $tax_data ) { foreach ( $order_taxes as $tax_item ) { $tax_item_id = $tax_item->get_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 ] : ''; ?>
get_tax_refunded_for_item( $item_id, $tax_item_id ); if ( $refunded ) { echo '' . wc_price( $refunded, $wc_price_arg ) . ''; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped } ?>
is_editable() ) : ?>