Created
June 23, 2022 11:10
-
-
Save kimcoleman/9bcf25ec05856751e017842006fd3ffe to your computer and use it in GitHub Desktop.
Hide the Coupon field on WooCommerce cart page.
This file contains hidden or 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
<?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