Make account checkout fields required

add_filter( 'woocommerce_checkout_fields', 'woo_filter_account_checkout_fields' ); function woo_filter_account_checkout_fields( $fields ) { $fields['account']['account_username']['required'] = true; $fields['account']['account_password']['required'] = true; $fields['account']['account_password-2']['required'] = true; return $fields; }

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.