Instantly share code, notes, and snippets.

Embed
What would you like to do?
/**
* @Title: WooCommerce Display Coupon on Checkout page only
* @Author: Mina Pansuriya
* @Website: http://minapansuriya.com
*/
function pbs_woo_hide_coupon_on_cart_page( $enabled ) {
if ( is_cart() ) {
$enabled = false;
}
return $enabled;
}
add_filter( 'woocommerce_coupons_enabled', 'pbs_woo_hide_coupon_on_cart_page' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment