mirror of
https://gh.wpcy.net/https://github.com/mainwp/Code-Snippets-Functions.git
synced 2026-04-29 11:32:21 +08:00
https://www.webtoffee.com/hide-coupon-code-field-from-woocommerce-checkout-page-or-cart-page/
7 lines
199 B
Text
7 lines
199 B
Text
function disable_coupon_field_on_checkout( $enabled ) {
|
|
if ( is_checkout() ) {
|
|
$enabled = false;
|
|
}
|
|
return $enabled;
|
|
}
|
|
add_filter( 'woocommerce_coupons_enabled', 'disable_coupon_field_on_checkout' );
|