Skip to content

Instantly share code, notes, and snippets.

@komal-maru
Created October 1, 2018 05:37
Show Gist options
  • Save komal-maru/9021866863de466c49344d0004954c92 to your computer and use it in GitHub Desktop.
Save komal-maru/9021866863de466c49344d0004954c92 to your computer and use it in GitHub Desktop.
Hide the Coupon code on the checkout page
<?php
// hide coupon field on the checkout page
function disable_coupon_field_on_checkout( $enabled ) {
if ( is_checkout() ) {
$enabled = false;
}
return $enabled;
}
add_filter( 'woocommerce_coupons_enabled', 'disable_coupon_field_on_checkout' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment