How to make company name mandatory in WooCommerce

In case you need the Company Name field to be mandatory in WooCommerce checkout process add the following code to functions.php file: function sv_require_wc_company_field( $fields ) { $fields['company']['required'] = true; return $fields; } add_filter( 'woocommerce_default_address_fields', 'sv_require_wc_company_field' );