Created
May 27, 2020 07:18
-
-
Save rynaldos-zz/ae95c02a3dfdf1b36754f30abb46d74e to your computer and use it in GitHub Desktop.
WooCommerce remove checkout page coupon field for guests
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
function no_coupon_checkout_function() { | |
if ( !is_user_logged_in() ) { | |
remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 ); | |
} | |
} | |
add_action('init', 'no_coupon_checkout_function'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment