Hide the coupon form on the cart or checkout page in WooCommerce

// hide coupon form everywhere
function hide_coupon_field( $enabled ) {
	if ( is_cart() || is_checkout() ) {
		$enabled = false;
	}
	return $enabled;
}
add_filter( 'woocommerce_coupons_enabled', 'hide_coupon_field' );

No comments yet.

Leave a Reply