Skip to content

Instantly share code, notes, and snippets.

@kimcoleman
Created June 23, 2022 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kimcoleman/9bcf25ec05856751e017842006fd3ffe to your computer and use it in GitHub Desktop.
Save kimcoleman/9bcf25ec05856751e017842006fd3ffe to your computer and use it in GitHub Desktop.
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