Merge pull request #18212 from WPprodigy/hide-add-coupon
Only show 'Apply coupon' in admin if coupons are enabled
This commit is contained in:
commit
052fbc73c6
|
@ -203,7 +203,9 @@ if ( wc_tax_enabled() ) {
|
|||
<p class="add-items">
|
||||
<?php if ( $order->is_editable() ) : ?>
|
||||
<button type="button" class="button add-line-item"><?php esc_html_e( 'Add item(s)', 'woocommerce' ); ?></button>
|
||||
<button type="button" class="button add-coupon"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
|
||||
<?php if ( wc_coupons_enabled() ) : ?>
|
||||
<button type="button" class="button add-coupon"><?php esc_html_e( 'Apply coupon', 'woocommerce' ); ?></button>
|
||||
<?php endif; ?>
|
||||
<?php else : ?>
|
||||
<span class="description"><?php echo wc_help_tip( __( 'To edit this order change the status back to "Pending"', 'woocommerce' ) ); ?> <?php esc_html_e( 'This order is no longer editable.', 'woocommerce' ); ?></span>
|
||||
<?php endif; ?>
|
||||
|
|
Loading…
Reference in New Issue