Knowledgebase
To make WooCommerce Billing fields compulsory, the following code can be added to functions.php. Please note unless you are experienced with php, you shoul dproceed with caution as an incorrect installation can render your website inoperable.
add_filter('woocommerce_billing_fields', 'wtd_custom_billing_fields', 1000, 1);
function wtd_custom_billing_fields( $fields ) {
$fields['billing_email']['required'] = true;
$fields['billing_phone']['required'] = true;
return $fields;
}
- 0 Users Found This Useful
Related Articles
Powered by WHMCompleteSolution

