Created
April 22, 2022 07:35
-
-
Save bradleysa/21fcbff66acc5ed866343956aff1933c to your computer and use it in GitHub Desktop.
WC: hide coupon field on Cart page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function hide_coupon_field_on_cart( $enabled ) { | |
if ( is_cart() ) { | |
$enabled = false; | |
} | |
return $enabled; | |
} | |
add_filter( 'woocommerce_coupons_enabled', 'hide_coupon_field_on_cart' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment