Make Billing Fields Compulsory

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
Was this answer helpful?

Related Articles

Removing session data from WooCommerce

WooCommerce keeps track of user sessions and baskets in the woocommerce_sessions table, and if...

Turn off Product Featured Image Zoom in WooCommerce 3

To remove the product featured image zoom effect in WooCommerce 3 at the following into your...

Powered by WHMCompleteSolution