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' );

By janoshke

Web developer and IT consultant. Freelancer with full respect for OpenCart and WordPress. Gamer, (ex)drummer and parent.

Leave a ReplyCancel reply

Exit mobile version