Prevents taxes columns from being removed when the order is no longer editable

This commit is contained in:
Claudio Sanches 2019-06-07 10:06:03 -03:00
parent 9eca72849d
commit 47c370809e
1 changed files with 3 additions and 1 deletions

View File

@ -43,7 +43,9 @@ if ( wc_tax_enabled() ) {
<th class="line_tax tips" data-tip="<?php echo esc_attr( $column_tip ); ?>">
<?php echo esc_attr( $column_label ); ?>
<input type="hidden" class="order-tax-id" name="order_taxes[<?php echo esc_attr( $tax_id ); ?>]" value="<?php echo esc_attr( $tax_item['rate_id'] ); ?>">
<a class="delete-order-tax" href="#" data-rate_id="<?php echo esc_attr( $tax_id ); ?>"></a>
<?php if ( $order->is_editable() ) : ?>
<a class="delete-order-tax" href="#" data-rate_id="<?php echo esc_attr( $tax_id ); ?>"></a>
<?php endif; ?>
</th>
<?php
endforeach;