From 9c3611624ca6bb084d98631f27ac22262ea7d8a7 Mon Sep 17 00:00:00 2001 From: Caleb Burks <19caleb95@gmail.com> Date: Fri, 2 Feb 2018 22:19:07 -0500 Subject: [PATCH] Remove extra CSS padding --- assets/css/admin.scss | 7 +++++-- includes/admin/meta-boxes/views/html-order-items.php | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/assets/css/admin.scss b/assets/css/admin.scss index cf7efb7528b..3fe16afa6f3 100644 --- a/assets/css/admin.scss +++ b/assets/css/admin.scss @@ -903,8 +903,7 @@ ul.wc_coupon_list { &.code { display: inline-block; position: relative; - padding-right: 2em; - padding-left: .5em; + padding: 0 .5em; background-color: #fff; border: 1px solid #aaa; -webkit-box-shadow: 0 1px 0 #dfdfdf; @@ -914,6 +913,10 @@ ul.wc_coupon_list { margin-right: 5px; margin-top: 5px; + &.editable { + padding-right: 2em; + } + .tips { cursor: pointer; diff --git a/includes/admin/meta-boxes/views/html-order-items.php b/includes/admin/meta-boxes/views/html-order-items.php index d59bb87621e..1b5e4b2cf9c 100644 --- a/includes/admin/meta-boxes/views/html-order-items.php +++ b/includes/admin/meta-boxes/views/html-order-items.php @@ -111,8 +111,9 @@ if ( wc_tax_enabled() ) {
  • $item ) : $post_id = $wpdb->get_var( $wpdb->prepare( "SELECT ID FROM {$wpdb->posts} WHERE post_title = %s AND post_type = 'shop_coupon' AND post_status = 'publish' LIMIT 1;", $item->get_code() ) ); + $class = $order->is_editable() ? 'code editable' : 'code'; ?> -
  • +
  • get_code() ) ?>