Hi Themeco,
Pro 2.2.5
X 2.2.5
WooCommerce: 3…4.4
Wordpress: 4.9.8
There appears to an additional Apply Coupon button being added on the WooCommerce cart page and I’d like to remove it.
Using Storefront theme, or any native WP theme the code for Apply Coupon button is only in the div class=“coupon” block:
<tr>
<td colspan="6" class="actions">
<div class="coupon">
<label for="coupon_code">Coupon:</label>
<input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="Coupon code">
<button type="submit" class="button" name="apply_coupon" value="Apply coupon">Apply coupon</button>
</div>
<button type="submit" class="button" name="update_cart" value="Update cart" disabled="">Update cart</button>
<input type="hidden" id="woocommerce-cart-nonce" name="woocommerce-cart-nonce" value="efb524cceb">
<input type="hidden" name="_wp_http_referer" value="/cart/">
</td>
</tr>
However on Pro/X the code is:
<tr>
<td colspan="6" class="actions">
<div class="coupon">
<label for="coupon_code">Coupon:</label>
<input type="text" name="coupon_code" class="input-text" id="coupon_code" value="" placeholder="Coupon code" style="outline: none;">
<button type="submit" class="button" name="apply_coupon" value="Apply coupon">Apply coupon</button>
</div>
<button type="submit" class="button" name="update_cart" value="Update cart" disabled="">Update cart</button>
<button type="submit" class="button" name="apply_coupon" value="Apply Coupon">Apply Coupon</button>
<input type="hidden" id="woocommerce-cart-nonce" name="woocommerce-cart-nonce" value="efb524cceb">
<input type="hidden" name="_wp_http_referer" value="/cart/">
</td>
</tr>
It creates an additional Coupon button after the Update cart and hides the defaults button in the div class=“coupon” block with the class which sets display: none;
.woocommerce .cart .actions .coupon label,
.woocommerce .cart .actions .coupon input[type="submit"],
.woocommerce .cart .actions .coupon button[type="submit"] {
display: none;
}
I’ve checked the x/woocommerce pro/woocommerce files in the theme, there is nowhere I see this additional button as an override.
Please let me know how to remove this additional Apply Coupon button - not using CSS to actually cleanly remove it from the output code.
As I said, I know I can use display: none; for the additional button however, this is hacky - I would like the native WooCommerce clean code.