woocommerce_admin_order_item_values + refund fields
This commit is contained in:
parent
a46ef1fced
commit
13f4f889a4
|
@ -18,7 +18,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
</div>
|
||||
</td>
|
||||
|
||||
<td class="quantity" width="1%">1</td>
|
||||
<?php do_action( 'woocommerce_admin_order_item_values', null, $item, absint( $item_id ) ); ?>
|
||||
|
||||
<td class="quantity" width="1%"></td>
|
||||
|
||||
<td class="line_cost" width="1%">
|
||||
<div class="view">
|
||||
|
@ -27,6 +29,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<div class="edit" style="display: none;">
|
||||
<input type="text" name="line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $item['line_total'] ) ) ? esc_attr( wc_format_localized_price( $item['line_total'] ) ) : ''; ?>" class="line_total wc_input_price" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_total wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
|
@ -47,6 +52,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<div class="edit" style="display: none;">
|
||||
<input type="text" name="line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $tax_item_total ) ) ? esc_attr( wc_format_localized_price( $tax_item_total ) ) : ''; ?>" class="line_tax wc_input_price" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_tax wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
|
@ -54,10 +62,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
endif;
|
||||
?>
|
||||
|
||||
<td class="wc-order-item-refund-quantity" width="1%" style="display: none;">
|
||||
<input type="number" step="1" min="0" max="1" autocomplete="off" name="order_item_refund_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" size="4" class="refund-quantity" />
|
||||
</td>
|
||||
|
||||
<td class="wc-order-edit-line-item">
|
||||
<?php if ( $can_be_edited ) : ?>
|
||||
<div class="wc-order-edit-line-item-actions">
|
||||
|
|
|
@ -155,6 +155,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<?php $item_qty = esc_attr( $item['qty'] ); ?>
|
||||
<input type="number" step="<?php echo apply_filters( 'woocommerce_quantity_input_step', '1', $_product ); ?>" min="0" autocomplete="off" name="order_item_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" value="<?php echo $item_qty; ?>" data-qty="<?php echo $item_qty; ?>" size="4" class="quantity" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<input type="number" step="<?php echo apply_filters( 'woocommerce_quantity_input_step', '1', $_product ); ?>" min="0" autocomplete="off" name="refund_order_item_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" size="4" class="refund_order_item_qty" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="line_cost" width="1%">
|
||||
|
@ -178,6 +181,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<input type="text" name="line_subtotal[<?php echo absint( $item_id ); ?>]" value="<?php echo $item_subtotal; ?>" class="line_subtotal wc_input_price tips" data-tip="<?php _e( 'Before pre-tax discounts.', 'woocommerce' ); ?>" data-subtotal="<?php echo $item_subtotal; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_total wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
|
@ -215,6 +221,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<input type="text" name="line_subtotal_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" value="<?php echo $item_subtotal_tax; ?>" class="line_subtotal_tax wc_input_price tips" data-tip="<?php _e( 'Before pre-tax discounts.', 'woocommerce' ); ?>"data-subtotal_tax="<?php echo $item_subtotal_tax; ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_tax wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
|
@ -222,10 +231,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
endif;
|
||||
?>
|
||||
|
||||
<td class="wc-order-item-refund-quantity" width="1%" style="display: none;">
|
||||
<input type="number" step="<?php echo apply_filters( 'woocommerce_quantity_input_step', '1', $_product ); ?>" min="0" max="<?php echo esc_attr( $item['qty'] ); ?>" autocomplete="off" name="order_item_refund_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" size="4" class="refund-quantity" />
|
||||
</td>
|
||||
|
||||
<td class="wc-order-edit-line-item">
|
||||
<?php if ( $can_be_edited ) : ?>
|
||||
<div class="wc-order-edit-line-item-actions">
|
||||
|
|
|
@ -44,7 +44,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
</div>
|
||||
</td>
|
||||
|
||||
<td class="quantity" width="1%">1</td>
|
||||
<?php do_action( 'woocommerce_admin_order_item_values', null, $item, absint( $item_id ) ); ?>
|
||||
|
||||
<td class="quantity" width="1%"></td>
|
||||
|
||||
<td class="line_cost" width="1%">
|
||||
<div class="view">
|
||||
|
@ -53,6 +55,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<div class="edit" style="display: none;">
|
||||
<input type="text" name="shipping_cost[<?php echo $item_id; ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $item['cost'] ) ) ? esc_attr( wc_format_localized_price( $item['cost'] ) ) : ''; ?>" class="line_total wc_input_price" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<input type="text" name="refund_line_total[<?php echo absint( $item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_total wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
|
@ -73,6 +78,9 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
<div class="edit" style="display: none;">
|
||||
<input type="text" name="shipping_taxes[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" value="<?php echo ( isset( $tax_item_total ) ) ? esc_attr( wc_format_localized_price( $tax_item_total ) ) : ''; ?>" class="line_tax wc_input_price" />
|
||||
</div>
|
||||
<div class="refund" style="display: block;">
|
||||
<input type="text" name="refund_line_tax[<?php echo absint( $item_id ); ?>][<?php echo absint( $tax_item_id ); ?>]" placeholder="<?php echo wc_format_localized_price( 0 ); ?>" class="refund_line_tax wc_input_price" />
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<?php
|
||||
|
@ -80,10 +88,6 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||
endif;
|
||||
?>
|
||||
|
||||
<td class="wc-order-item-refund-quantity" width="1%" style="display: none;">
|
||||
<input type="number" step="1" min="0" max="1" autocomplete="off" name="order_item_refund_qty[<?php echo absint( $item_id ); ?>]" placeholder="0" size="4" class="refund-quantity" />
|
||||
</td>
|
||||
|
||||
<td class="wc-order-edit-line-item">
|
||||
<?php if ( $can_be_edited ) : ?>
|
||||
<div class="wc-order-edit-line-item-actions">
|
||||
|
|
Loading…
Reference in New Issue