MainWP Community

Remove the coupon field for guests in WooCommerce

Remove the coupon field for guests in WooCommerce on your child site.

Snippet Type

Execute on Child Sites

Snippet

function wc_no_coupon_checkout_function() {
    if ( !is_user_logged_in() ) {

    remove_action( 'woocommerce_before_checkout_form', 'woocommerce_checkout_coupon_form', 10 );

    }
}
    
add_action('init', 'wc_no_coupon_checkout_function');
1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.