Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Hide the Coupon field on WooCommerce cart page.
<?php
/**
* Hide the Coupon field on WooCommerce cart page.
*/
function my_woocommerce_coupons_enabled( $enabled ) {
if ( is_cart() ) {
$enabled = false;
}
return $enabled;
}
add_filter( 'woocommerce_coupons_enabled', 'my_woocommerce_coupons_enabled' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment