Ocultar código promocional del carrito y checkout

Ocultar código promocional del carrito y checkout

Quitar los códigos promocionales del carrito y checkout.

// hide coupon field on the cart page
function disable_coupon_field_on_cart( $enabled ) {
if ( is_cart() ) {
$enabled = false;
}
return $enabled;
}
add_filter( "woocommerce_coupons_enabled", "disable_coupon_field_on_cart" );


// 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" );