How to hide coupon box on checkout page in WooCommerce
WooCommerce shows a coupon field on the cart page and a notice and coupon field on the checkout page. This could be confusing for your customers as they think they need to enter the coupon code twice. With the little snippet below you can hide the coupon field on the checkout page if there is already a coupon code applied to the cart.
You can also use this WordPress functions.php snippet to hide the coupon code box on checkout if coupon codes are applied automatically, for example with a link within an email newsletter.
<?php
/*
* Hide coupon notice on the checkout page if a coupon has been applied in cart
*/
add_filter( 'woocommerce_coupons_enabled', 'wpf_wc_coupon_checkout' );
function wpf_wc_coupon_checkout($coupons_enabled) {
global $woocommerce;
if (!empty($woocommerce->cart->applied_coupons) ) {
return false;
}
return $coupons_enabled;
}
Coupon codes leads to more traffic and conversion
Through discounts you can generate more traffic to your shop. It’s important that you promote your coupons outside your shop, for example through email marketing, discount sites or Facebook. This way you’ll most likely get more people come to your shop, which could lead to more conversions. This way you can build brand awareness or get more customer reviews. Coupon codes are certainly a way to generate more traffic and conversions.
How do you use coupon codes or other discounts in your WooCommerce store? We’ll love to hear from you!