html-order-download-permission.php
6 years ago
html-order-fee.php
3 months ago
html-order-item-meta.php
4 years ago
html-order-item.php
9 months ago
html-order-items.php
1 month ago
html-order-notes.php
1 month ago
html-order-refund.php
3 months ago
html-order-shipping.php
3 months ago
html-product-attribute-inner.php
1 month ago
html-product-attribute.php
3 years ago
html-product-data-advanced.php
5 months ago
html-product-data-attributes.php
1 month ago
html-product-data-general.php
2 months ago
html-product-data-inventory.php
4 months ago
html-product-data-linked-products.php
3 months ago
html-product-data-panel.php
1 year ago
html-product-data-shipping.php
3 years ago
html-product-data-variations.php
1 month ago
html-product-download.php
4 months ago
html-product-variation-download.php
4 months ago
html-variation-admin.php
1 month ago
html-order-refund.php
84 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Show order refund |
| 4 | * |
| 5 | * @var object $refund The refund object. |
| 6 | * @package WooCommerce\Admin |
| 7 | */ |
| 8 | |
| 9 | if ( ! defined( 'ABSPATH' ) ) { |
| 10 | exit; // Exit if accessed directly. |
| 11 | } |
| 12 | |
| 13 | $who_refunded = new WP_User( $refund->get_refunded_by() ); |
| 14 | ?> |
| 15 | <tr class="refund <?php echo ( ! empty( $class ) ) ? esc_attr( $class ) : ''; ?>" data-order_refund_id="<?php echo esc_attr( $refund->get_id() ); ?>"> |
| 16 | <td class="thumb"><div></div></td> |
| 17 | |
| 18 | <td class="name"> |
| 19 | <?php |
| 20 | if ( $who_refunded->exists() ) { |
| 21 | printf( |
| 22 | /* translators: 1: refund id 2: refund date 3: username */ |
| 23 | esc_html__( 'Refund #%1$s - %2$s by %3$s', 'woocommerce' ), |
| 24 | esc_html( $refund->get_id() ), |
| 25 | esc_html( wc_format_datetime( $refund->get_date_created(), get_option( 'date_format' ) . ', ' . get_option( 'time_format' ) ) ), |
| 26 | sprintf( |
| 27 | '<abbr class="refund_by" title="%1$s">%2$s</abbr>', |
| 28 | /* translators: 1: ID who refunded */ |
| 29 | sprintf( esc_attr__( 'ID: %d', 'woocommerce' ), absint( $who_refunded->ID ) ), |
| 30 | esc_html( $who_refunded->display_name ) |
| 31 | ) |
| 32 | ); |
| 33 | } else { |
| 34 | printf( |
| 35 | /* translators: 1: refund id 2: refund date */ |
| 36 | esc_html__( 'Refund #%1$s - %2$s', 'woocommerce' ), |
| 37 | esc_html( $refund->get_id() ), |
| 38 | esc_html( wc_format_datetime( $refund->get_date_created(), get_option( 'date_format' ) . ', ' . get_option( 'time_format' ) ) ) |
| 39 | ); |
| 40 | } |
| 41 | ?> |
| 42 | <?php if ( $refund->get_reason() ) : ?> |
| 43 | <p class="description"><?php echo esc_html( $refund->get_reason() ); ?></p> |
| 44 | <?php endif; ?> |
| 45 | <input type="hidden" class="order_refund_id" name="order_refund_id[]" value="<?php echo esc_attr( $refund->get_id() ); ?>" /> |
| 46 | |
| 47 | <?php do_action( 'woocommerce_after_order_refund_item_name', $refund ); ?> |
| 48 | </td> |
| 49 | |
| 50 | <?php do_action( 'woocommerce_admin_order_item_values', null, $refund, $refund->get_id() ); ?> |
| 51 | |
| 52 | <?php if ( $cogs_is_enabled ) : ?> |
| 53 | <td class="item_cost_of_goods"></td> |
| 54 | <?php endif; ?> |
| 55 | |
| 56 | <td class="item_cost" width="1%"> </td> |
| 57 | <td class="quantity" width="1%"> </td> |
| 58 | |
| 59 | <td class="line_cost" width="1%"> |
| 60 | <div class="view"> |
| 61 | <?php |
| 62 | echo wp_kses_post( |
| 63 | wc_price( '-' . $refund->get_amount(), array( 'currency' => $refund->get_currency() ) ) |
| 64 | ); |
| 65 | ?> |
| 66 | </div> |
| 67 | </td> |
| 68 | |
| 69 | <?php |
| 70 | if ( wc_tax_enabled() ) : |
| 71 | $total_taxes = count( $order_taxes ); |
| 72 | ?> |
| 73 | <?php for ( $i = 0; $i < $total_taxes; $i++ ) : ?> |
| 74 | <td class="line_tax" width="1%"></td> |
| 75 | <?php endfor; ?> |
| 76 | <?php endif; ?> |
| 77 | |
| 78 | <td class="wc-order-edit-line-item"> |
| 79 | <div class="wc-order-edit-line-item-actions"> |
| 80 | <a class="delete_refund" href="#"></a> |
| 81 | </div> |
| 82 | </td> |
| 83 | </tr> |
| 84 |