Created
October 20, 2023 14:14
-
-
Save finalwebsites/c61ab3b55905b826446e27b17817bf92 to your computer and use it in GitHub Desktop.
Disable the coupon form on the checkout page from WooCommerce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// place this code inside the functions.php file from your child code. | |
function fw_disable_coupon_field_on_checkout( $enabled ) { | |
if ( is_checkout() ) { | |
$enabled = false; | |
} | |
return $enabled; | |
} | |
add_filter( 'woocommerce_coupons_enabled', 'fw_disable_coupon_field_on_checkout' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment