Created
July 2, 2025 17:35
-
-
Save Shaz3e/7b66f9371ea1d74fb55333aa5dcd560a to your computer and use it in GitHub Desktop.
Disable Email Fields at Checkout in WooCommerce
This file contains hidden or 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 | |
// Add this code inside themes' functions.php | |
add_filter('woocommerce_checkout_fields', 'hide_email_address_field'); | |
function hide_email_address_field($fields) | |
{ | |
unset($fields['billing']['billing_email']); | |
return $fields; | |
} | |
add_action('wp_head', 'add_custom_checkout_css'); | |
function add_custom_checkout_css() | |
{ | |
echo '<style> | |
#billing_email_field { | |
display: none; | |
} | |
</style>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment