woocommerce/includes/admin/meta-boxes/views/html-order-refund.php

52 lines
1.8 KiB
PHP
Raw Normal View History

2014-07-16 20:12:33 +00:00
<?php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}
2015-02-03 14:02:38 +00:00
/**
* @var object $refund The refund object.
*/
2016-08-22 10:00:31 +00:00
$who_refunded = new WP_User( $refund->get_refunded_by() );
2014-07-16 20:12:33 +00:00
?>
2016-08-22 10:00:31 +00:00
<tr class="refund <?php echo ( ! empty( $class ) ) ? $class : ''; ?>" data-order_refund_id="<?php echo $refund->get_id(); ?>">
2014-07-22 13:27:47 +00:00
<td class="thumb"><div></div></td>
2014-07-16 20:12:33 +00:00
<td class="name">
<?php
2016-10-29 20:03:28 +00:00
/* translators: 1: refund id 2: date */
printf( __( 'Refund #%1$s - %2$s', 'woocommerce' ), $refund->get_id(), date_i18n( get_option( 'date_format' ) . ', ' . get_option( 'time_format' ), $refund->get_date_created() ) );
2014-10-09 15:43:21 +00:00
if ( $who_refunded->exists() ) {
echo ' ' . esc_attr_x( 'by', 'Ex: Refund - $date >by< $username', 'woocommerce' ) . ' ' . '<abbr class="refund_by" title="' . sprintf( esc_attr__( 'ID: %d', 'woocommerce' ), absint( $who_refunded->ID ) ) . '">' . esc_attr( $who_refunded->display_name ) . '</abbr>' ;
}
?>
2016-08-22 12:04:57 +00:00
<?php if ( $refund->get_reason() ) : ?>
<p class="description"><?php echo esc_html( $refund->get_reason() ); ?></p>
2014-07-28 10:41:47 +00:00
<?php endif; ?>
2016-08-22 10:00:31 +00:00
<input type="hidden" class="order_refund_id" name="order_refund_id[]" value="<?php echo esc_attr( $refund->get_id() ); ?>" />
2014-07-16 20:12:33 +00:00
</td>
2016-08-22 10:00:31 +00:00
<?php do_action( 'woocommerce_admin_order_item_values', null, $refund, $refund->get_id() ); ?>
2014-10-02 12:40:30 +00:00
<td class="item_cost" width="1%">&nbsp;</td>
2014-07-28 10:45:16 +00:00
<td class="quantity" width="1%">&nbsp;</td>
2014-07-16 20:12:33 +00:00
<td class="line_cost" width="1%">
<div class="view">
2016-08-22 12:04:57 +00:00
<?php echo wc_price( '-' . $refund->get_amount() ); ?>
2014-07-16 20:12:33 +00:00
</div>
</td>
2016-09-13 21:24:21 +00:00
<?php if ( wc_tax_enabled() ) : $total_taxes = count( $order_taxes ); ?>
<?php for ( $i = 0; $i < $total_taxes; $i++ ) : ?>
<td class="line_tax" width="1%"></td>
<?php endfor; ?>
<?php endif; ?>
2016-03-22 14:54:02 +00:00
2014-07-16 20:12:33 +00:00
<td class="wc-order-edit-line-item">
<div class="wc-order-edit-line-item-actions">
<a class="delete_refund" href="#"></a>
</div>
</td>
</tr>