Add refund related filters to html-order-items template
This commit is contained in:
parent
22721e0a70
commit
8ee6fa6fbe
|
@ -282,7 +282,8 @@ if ( wc_tax_enabled() ) {
|
|||
<?php else : ?>
|
||||
<span class="description"><?php echo wc_help_tip( __( 'To edit this order change the status back to "Pending payment"', 'woocommerce' ) ); ?> <?php esc_html_e( 'This order is no longer editable.', 'woocommerce' ); ?></span>
|
||||
<?php endif; ?>
|
||||
<?php if ( 0 < $order->get_total() - $order->get_total_refunded() || 0 < absint( $order->get_item_count() - $order->get_item_count_refunded() ) ) : ?>
|
||||
|
||||
<?php if ( apply_filters( 'woocommerce_admin_order_should_render_refunds', false, $order->get_id(), $order ) || 0 < $order->get_total() - $order->get_total_refunded() || 0 < absint( $order->get_item_count() - $order->get_item_count_refunded() ) ) : ?>
|
||||
<button type="button" class="button refund-items"><?php esc_html_e( 'Refund', 'woocommerce' ); ?></button>
|
||||
<?php endif; ?>
|
||||
<?php
|
||||
|
@ -308,7 +309,7 @@ if ( wc_tax_enabled() ) {
|
|||
<button type="button" class="button cancel-action"><?php esc_html_e( 'Cancel', 'woocommerce' ); ?></button>
|
||||
<button type="button" class="button button-primary save-action"><?php esc_html_e( 'Save', 'woocommerce' ); ?></button>
|
||||
</div>
|
||||
<?php if ( 0 < $order->get_total() - $order->get_total_refunded() || 0 < absint( $order->get_item_count() - $order->get_item_count_refunded() ) ) : ?>
|
||||
<?php if ( apply_filters( 'woocommerce_admin_order_should_render_refunds', false, $order->get_id(), $order ) || 0 < $order->get_total() - $order->get_total_refunded() || 0 < absint( $order->get_item_count() - $order->get_item_count_refunded() ) ) : ?>
|
||||
<div class="wc-order-data-row wc-order-refund-items wc-order-data-row-toggle" style="display: none;">
|
||||
<table class="wc-order-totals">
|
||||
<?php if ( 'yes' === get_option( 'woocommerce_manage_stock' ) ) : ?>
|
||||
|
|
Loading…
Reference in New Issue