Adding the information about who did the refund on the backend
This commit is contained in:
parent
fbf4ffd39b
commit
6b3f228a55
|
@ -2,14 +2,22 @@
|
|||
if ( ! defined( 'ABSPATH' ) ) {
|
||||
exit; // Exit if accessed directly
|
||||
}
|
||||
$who_refunded = new WP_User( $refund->post->post_author );
|
||||
?>
|
||||
<tr class="refund <?php echo ( ! empty( $class ) ) ? $class : ''; ?>" data-order_refund_id="<?php echo $refund->id; ?>">
|
||||
<td class="check-column"></td>
|
||||
|
||||
<td class="thumb"><div></div></td>
|
||||
|
||||
<?php var_dump( $who_refunded->display_name ); ?>
|
||||
|
||||
<td class="name">
|
||||
<?php _e( 'Refund', 'woocommerce' ); ?> - <?php echo date_i18n( get_option( 'date_format' ) . ', ' . get_option( 'time_format' ), strtotime( $refund->post_date ) ); ?>
|
||||
<?php
|
||||
echo esc_attr__( 'Refund', 'woocommerce' ) . ' - ' . esc_attr( date_i18n( get_option( 'date_format' ) . ', ' . get_option( 'time_format' ), strtotime( $refund->post_date ) ) );
|
||||
if ( $who_refunded->exists() ){
|
||||
echo ' ' . esc_attr__( 'by', 'Ex: Refund - $date >by< $username', 'woocommerce' ) . ' ' . '<abbr class="refund_by" title="' . esc_attr__( 'ID: ', 'woocommerce' ) . absint( $who_refunded->ID ) . '">' . esc_attr( $who_refunded->display_name ) . '</abbr>' ;
|
||||
}
|
||||
?>
|
||||
<?php if ( $refund->get_refund_reason() ) : ?>
|
||||
<p class="description"><?php echo esc_html( $refund->get_refund_reason() ); ?></p>
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Reference in New Issue